Well, well, well!
It's Kingston Don! hehe. How have you been? Try the code below.
SELECT ENAME,
CASE WHEN TRANSLATE(TRANSLATE(ENAME, '0123456789, ',
'0000000000 '), ' ', '0123456789') = ' '
THEN 'ALL_NUMBERS'
WHEN TRANSLATE(TRANSLATE(UPPER(ENAME),
'A-Z', '000000000'), ' ', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') = ''
AND ENAME NOT LIKE '% %'
THEN 'ALL_ALPHABETS'
ELSE 'MIXED'
END AS "STATUS"
FROM DEDBADM.EMP
ORDER BY STATUS, ENAME
FETCH FIRST 100 ROWS ONLY;
Please take a few minutes to provide feedback on the quality of service you received. The Department of Education values your feedback as a customer. Commissioner John L. Winn is committed to continuously assessing and improving the level and quality of services provided to you by Department staff. Simply use the link below. Thank you in advance for completing the survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
-----Original Message-----
From: Kingston Don (UK - London)
[mailto:db2udbdba-ezmlmshield-x90909761.[Email address protected]
Sent: Wednesday, June 28, 2006 6:04 AM
To: LazyDBA Discussion
Subject: Db2 isnumeric function?
Hi all,
I want to identify alphanumeric characters in a dataset. Is there a db2
isnumeric function as in oracle? The reason I need to identify the
alphanumeric records is because if I am trying to convert a varchar
field to an integer using
select INTEGER(column_name) from ....
It is failing when it hit an alpha.
Can anyone suggest an alternative method of doing this or a way to
identify the alpha so I can eliminate them?
Thanks in advance.
Don
IMPORTANT NOTICE
If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to the statement below or contact the sender.
This communication is from Deloitte & Touche LLP. Deloitte & Touche LLP is a limited liability partnership registered in England and Wales with registered number OC303675 and its registered office at Stonecutter Court, 1 Stonecutter Street, London EC4A 4TR, United Kingdom. Deloitte & Touche LLP is authorised and regulated by the Financial Services Authority. Deloitte & Touche LLP is the United Kingdom member firm of Deloitte Touche Tohmatsu ('DTT'), a Swiss Verein whose member firms are separate and independent legal entities. Neither DTT nor any of its member firms has any liability for each other's acts or omissions. Services are provided by member firms or their subsidiaries and not by DTT.
This communication and any attachments contain information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to IT.SECURITY.[Email address protected] then delete the email and destroy any copies of it.
E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept liability for any such matters or their consequences. Anyone who communicates with us by e-mail is taken to accept the risks in doing so. When addressed to our clients, any opinions or advice contained in this e-mail and any attachments are subject to the terms and conditions expressed in the governing Deloitte & Touche LLP client engagement letter.
Opinions, conclusions and other information in this e-mail and any attachments which do not relate to the official business of the firm are neither given nor endorsed by it.
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
DB2 & UDB email list listserv db2-l LazyDBA home page