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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CONVERT (ODBC compatible)<br />

Syntax<br />

Example This example illustrates the CONCAT function:<br />

Notes • Both of the arguments must be of type CHARACTER or VARCHAR.<br />

86<br />

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

• If any of the argument expressions evaluate to NULL, the result is NULL.<br />

• The two char_expression expressions and the result of the CONCAT function can contain<br />

multi-byte characters.<br />

Compatibility<br />

ODBC compatible<br />

CONVERT (ODBC compatible)<br />

Syntax<br />

CONCAT ( char_expression , char_expression )<br />

SELECT last_name, empno, salary<br />

FROM customer<br />

WHERE project = CONCAT('US',proj_nam);<br />

Converts an expression to another data type. The first argument is the expression to be<br />

converted. The second argument is the target data type.<br />

If the expression evaluates to NULL, the result of the function is NULL.<br />

The ODBC CONVERT function provides ODBC-compliant syntax for data type conversions. You<br />

must enclose the function with the ODBC escape clause { fn } to use ODBC-compliant syntax.<br />

{ fn CONVERT ( expression , data_type ) }<br />

Note Braces are part of the actual syntax. The following data types are used:<br />

<strong>SQL</strong>_BINARY | <strong>SQL</strong>_BIT | <strong>SQL</strong>_CHAR | <strong>SQL</strong>_DATE | <strong>SQL</strong>_DECIMAL<br />

| <strong>SQL</strong>_DOUBLE | <strong>SQL</strong>_FLOAT | <strong>SQL</strong>_INTEGER | <strong>SQL</strong>_REAL<br />

| <strong>SQL</strong>_SMALLINT | <strong>SQL</strong>_TIME | <strong>SQL</strong>_TIMESTAMP | <strong>SQL</strong>_TINYINT<br />

| <strong>SQL</strong>_VARBINARY | <strong>SQL</strong>_VARCHAR<br />

Compatibility<br />

ODBC compatible

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

Saved successfully!

Ooh no, something went wrong!