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.

LEAST<br />

Syntax<br />

Compatibility<br />

ODBC compatible<br />

Returns the lowest value among the values of the given expressions.<br />

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

LEAST<br />

Notes • The first argument to the function can be of any type. However, the types of the subsequent<br />

arguments must be compatible with that of the first argument.<br />

LEFT<br />

Syntax<br />

LEAST ( expression , expression, ... )<br />

SELECT cust_no, last_name,<br />

LEAST (ADD_MONTHS (start_date, 10), SYSDATE)<br />

FROM customer ;<br />

• The type of the result is the same as that of the first argument.<br />

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

• When the data type of an expression is either CHARACTER(length) or VARCHAR(length),<br />

the expression can contain multi-byte characters. The sort weight for each character is<br />

determined by the collation table in the database.<br />

Compatibility<br />

Progress extension<br />

Returns the leftmost count of characters of string_exp.<br />

LEFT ( string_exp , count )<br />

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

SELECT LEFT(last_name,4) FROM customer WHERE last_name = 'Goldman';<br />

LEFT(LAST_NAME),4)<br />

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

Gold<br />

1 record selected<br />

101

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

Saved successfully!

Ooh no, something went wrong!