Skip to content

Supported SQL Syntax

In addition to the syntax outlined here: http://syware.com/products/odbc_driver_kit/drdbdr3.php, the TS ODBC DataServer driver supports the following syntax:

LIMIT {[offset,] row_count | row_count [OFFSET offset]}

This can be used to restrict the number of rows returned or to a specific number of records starting at a specific record. Note that the offset is 0-based.

Examples:

To return the first 20 rows:

SELECT * FROM UTCUST LIMIT 20

To return 10 rows starting with the 5 record:

th

SELECT * FROM UTCUST LIMIT 4,10

This can also be coded as

SELECT * FROM UTCUST LIMIT 10 OFFSET 4

Starting with version 8.8.0, time is now supported in WHERE clauses. The syntax is similar to the way dates are specified.

{d ‘YYYY-MM-DD’}

To specify a date with time:

{ts ‘YYYY-MM-DD HH:MI:SS’}

To specify just the time:

{t ‘HH:MI:SS’}

The syntax used depends on how the date field is defined within the dictionary.

From the TS ODBC DataServer Reference, version 8.9.1. Open this page in the PDF