SQL Reference

Chapter 2 | Supported standards 24
Constants
Constants are values that do not change. For example, in the expression PRICE * 1.05, the
value 1.05 is a constant. Or you might assign a value of 30 to the constant
Number_Of_Days_In_June.
You must enclose character constants in pairs of single quotation marks ('). T
o include a single
quotation mark in a character constant enclosed by single quotation marks, use two single
quotation marks together (for example, 'Don''t').
For ODBC and JDBC applications, FileMaker accep
ts the ODBC/JDBC format date, time, and
timestamp constants in braces ({}), for example:
1 {D '2016-06-05'}
1 {T '14:35:10'}
1 {TS '2016-06-05 14:35:10'}
FileMaker allows the type specifier (D, T, TS)
to be in upper case or lower case. You may use any
number of spaces after the type specifier, or even omit the space.
FileMaker also accepts SQL-92 syntax ISO date and time formats with no
braces:
1 DATE 'YYYY-MM-DD'
1 TIME 'HH:MM:SS'
1 TIMESTAMP 'YYYY-MM-DD HH:MM:SS'
The FileMaker Pro ExecuteSQL function acce
pts only the SQL-92 syntax ISO date and time
formats with no braces.
Constant Acceptable syntax (examples)
Text 'Paris'
Number 1.05
Date DATE '2016-06-05'
{ D '2016-06-05' }
{06/05/2016}
{06/05/16}
Note T
he 2-digit year syntax is not supported for the ODBC/JDBC format or the SQL-92
format.
Time TIME '14:35:10'
{ T '14:35:10' }
{14:35:10}
Timestamp TIMESTAMP '2016-06-05 14:35:10'
{ TS '2016-06-05 14:35:10'}
{06/05/2016 14:35:10}
{06/05/16 14:35:10}
Make sure Str
ict data type: 4-Digit Year Date is not selected as a validation option in the
FileMaker database file for a field using this 2-digit year syntax.
Note T
he 2-digit year syntax is not supported for the ODBC/JDBC format or the SQL-92
format.
When entering date and time values, match the format of the database file locale. For example, if
the database was created on an Italian language system, use Italian date and time formats.