If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
This should also be the most efficient way of doing things since CAST is not a scalar function but a built-in functionality.
Of course, most people will use a scalar function like SUBSTR, SUBSTRING or LEFT, but for one thing these names are not standardised so your SQL becomes less portable, and secondly there may be a performance hit when calling scalar functions.
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting