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.

IFNULL<br />

Syntax<br />

• The argument must be specified in the format hh:mi:ss.<br />

• The result is of type SHORT.<br />

• If the argument expression evaluates to NULL, the result is NULL.<br />

Compatibility<br />

ODBC compatible<br />

Returns value if expr is NULL. If expr is not NULL, IFNULL returns expr.<br />

IFNULL<br />

Example In this example, which illustrates the IFNULL function, the SELECT statement returns three rows<br />

with a NULL value in column C1, and two non-NULL values:<br />

Note The data type of value must be compatible with the data type of expr.<br />

INITCAP<br />

Syntax<br />

IFNULL( expr, value)<br />

SELECT C1, IFNULL(C1, 9999) FROM TEMP ORDER BY C1;<br />

C1 IFNULL(C1,9999)<br />

-- ----------------<br />

9999<br />

9999<br />

9999<br />

1 1<br />

3 3<br />

Compatibility<br />

ODBC compatible<br />

Returns the result of the argument character expression after converting the first character to<br />

uppercase and the subsequent characters to lowercase.<br />

INITCAP ( char_expression )<br />

Example The following example shows how to use the INITCAP function:<br />

SELECT INITCAP (last_name)<br />

FROM customer ;<br />

97

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

Saved successfully!

Ooh no, something went wrong!