Numeric constants can be written in the usual way (123.456) or in scientific notation (12.34E-56). String constants are enclosed by single quotes, for example 'string' (do not use double quotes). You can include a single quote in a string literal by doubling it, for example 'Brian''s'. Date constants are written as dd.mm.yyyy (only dots are accepted as separators) and time constants as hh:mm or hh:mm:ss. However if you are using a third party product such as Microsoft Access to access DP4 you will need to use that product's date or time syntax in SQL statements. For example Access expects dates to be written in the form #26/04/2002# or #26 May 2002#. Although this format is not acceptable to DP4 it will work because Access does not submit dates as literals, but as ? parameters. Character strings may be used instead of dates in many instances, and automatic conversion will take place.
Comment lines (beginning with -- and ending with the end of line) are ignored, as are C-style comments, such as /* comment */. However C style comments containing the word DP4SQL immediately after the opening /* are treated as compiler hints (rather like pragmas in C), and can be used to help control how the SQL Engine executes a particular query.
The special constants:
CURRENT DATECURRENT TIMEUSERNOYESshould be self explanatory.
Information on the following topics may be found by clicking on the appropriate link.