Escape Sequences
Each and every data source has its own way of dealing with specific data types. The DATE data type format for Oracle 6 is Aug 20, 1997, for example, but IBM’s DB2 is 1997-08-20. This becomes quite a problem when creating a SQL statement in which you have no idea what the actual database engine will be.
Because ODBC attempts to abstract the particulars of different databases, the ODBC standard has adopted a technique to contend with this problem. This technique is called an escape sequence. When an ODBC driver finds an escape clause in a SQL statement, it converts it to whatever format it needs to be to suit the particular database to which the statement will be sent.
Date and Times
The escape clause for a date is {d 'yyyy-mm-dd'} ...
Get Win32 Perl Programming: The Standard Extensions, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.