Skip to main content

I'm trying to work out the correct syntax for the "select" option to "limit the returned results" when testing in Swagger using a UniVerse database as the data source. For example, I have a date field and want to select all the dates in a specific year.

Is there some documentation that details how this works? I've tried standard UniVerse syntax, standard SQL syntax, but neither of these seem to do what I want to do.

I'm trying to work out the correct syntax for the "select" option to "limit the returned results" when testing in Swagger using a UniVerse database as the data source. For example, I have a date field and want to select all the dates in a specific year.

Is there some documentation that details how this works? I've tried standard UniVerse syntax, standard SQL syntax, but neither of these seem to do what I want to do.

You're looking for SAMPLE and SAMPLED clauses. Example: SELECT VOC SAMPLE 5 will select the first five records from the VOC file.  SELECT VOC SAMPLED 5 would select every 5th record. They do have it in their retrieve manual. You can download it from here. They've got all their Universe manuals available online and for download here.


I'm trying to work out the correct syntax for the "select" option to "limit the returned results" when testing in Swagger using a UniVerse database as the data source. For example, I have a date field and want to select all the dates in a specific year.

Is there some documentation that details how this works? I've tried standard UniVerse syntax, standard SQL syntax, but neither of these seem to do what I want to do.

Hi Joe, it appears that I haven't explained my query very well — I'm creating an MVIS GET endpoint to enquire of a UniVerse database file and I want to select only records with specific dates, not just a sample from them. When I use Swagger to test the endpoint it offers a series of options, the first of which is "select" and claims to allow me to enter some selection criteria, but there is no guidance that I can find on how to do it, nor have my attempts to get it to work been successful.

So I'm looking for an example of how the fields in Swagger should be completed in order to extract a specific date range. The SAMPLE(D) clause does not help in that regard!


I'm trying to work out the correct syntax for the "select" option to "limit the returned results" when testing in Swagger using a UniVerse database as the data source. For example, I have a date field and want to select all the dates in a specific year.

Is there some documentation that details how this works? I've tried standard UniVerse syntax, standard SQL syntax, but neither of these seem to do what I want to do.


I'm trying to work out the correct syntax for the "select" option to "limit the returned results" when testing in Swagger using a UniVerse database as the data source. For example, I have a date field and want to select all the dates in a specific year.

Is there some documentation that details how this works? I've tried standard UniVerse syntax, standard SQL syntax, but neither of these seem to do what I want to do.

If you have a DICT item for the year, have you tried putting YEAR = '2021' in the Swagger select box.