O'Reilly logo

Win32 Perl Programming: The Standard Extensions, Second Edition by Dave Roth

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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'} ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required