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.

Notes • char_expression, from_set, and to_set can be any character expression.<br />

UCASE<br />

Syntax<br />

SELECT TRANSLATE (customer_name, ' ', '_')<br />

"TRANSLATE Example" from customers;<br />

TRANSLATE EXAMPLE<br />

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

Sports_Cars_Inc.__________________________________<br />

Mighty_Bulldozer_Inc._____________________________<br />

Ship_Shapers_Inc._________________________________<br />

Tower_Construction_Inc.___________________________<br />

Chemical_Construction_Inc.________________________<br />

Aerospace_Enterprises_Inc.________________________<br />

Medical_Enterprises_Inc.__________________________<br />

Rail_Builders_Inc.________________________________<br />

Luxury_Cars_Inc.__________________________________<br />

Office_Furniture_Inc._____________________________<br />

10 records selected<br />

• For each character in char_expression, TRANSLATE checks for the same character in<br />

from_set.<br />

UCASE<br />

• If it is in from_set, TRANSLATE translates it to the corresponding character in to_set (if<br />

the character is the nth character in from_set, the nth character in to_set).<br />

• If the character is not in from_set TRANSLATE does not change it.<br />

• If from_set is longer than to_set, TRANSLATE does not change trailing characters in<br />

from_set that do not have a corresponding character in to_set.<br />

• If either from_set or to_set is NULL, TRANSLATE does nothing.<br />

Compatibility<br />

Progress extension<br />

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

uppercase. UCASE is identical to UPPER, but provides ODBC-compatible syntax.<br />

UCASE ( char_expression )<br />

Example This example illustrates the UCASE function, returning columns from rows in the customer table<br />

where the last_name column, after being converted to uppercase, is equal to ‘SMITH’:<br />

SELECT *<br />

FROM customer<br />

WHERE UCASE (last_name) = 'SMITH' ;<br />

Notes • The argument to the function must be of type CHARACTER.<br />

135

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

Saved successfully!

Ooh no, something went wrong!