23.10.2012 Views

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

Openedge Data Management: SQL Reference - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Timestamp literals<br />

Relational operators<br />

Timestamp literals specify a date and a time separated by a space, enclosed in single quotation<br />

marks ( ' ' ). This is the syntax for timestamp literals:<br />

Syntax<br />

{ ts 'yyyy-mm-dd hh:mi:ss' }<br />

A timestamp literal enclosed in an escape clause is compatible with ODBC. Precede the<br />

literal string with an open brace ( { ) and a lowercase ts. End the literal with a close brace<br />

( } ). Note that braces are part of the syntax. If you use the ODBC escape clause, you must<br />

specify the timestamp using the format yyyy-mm-dd hh:mi:ss.<br />

date_literal<br />

A date.<br />

time_literal<br />

A time literal.<br />

Examples The following example illustrates how to INSERT a timestamp literal into a column:<br />

Relational operators<br />

{ ts 'yyyy-mm-dd hh:mi:ss' }<br />

INSERT INTO DTEST<br />

VALUES ( { ts '1956-05-07 10:41:37'} ) ;<br />

The following example illustrates a timestamp literal with the ODBC escape clause:<br />

SELECT * FROM DTEST WHERE C1 = {ts '1985-08-10 05:41:37'} ;<br />

Relational operators specify how <strong>SQL</strong> compares expressions in basic and quantified predicates.<br />

This is the syntax for relational operators:<br />

Syntax<br />

= | | != | ^= | < | | >=<br />

Table 49 lists the relational operators and the resulting predicates for each operator.<br />

207

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!