It's always good to know more than one way to do something:
select trim(L '0' from myColumn)
from myTable
HTH,
Dave
The information contained in this e-mail message and any attachments is confidential and intended only for the addressee(s). If you are not an addressee, you may not copy or disclose the information, or act upon it, and you should delete it entirely from your email system. Please also notify the sender that you received this e-mail in error.
-----Original Message-----
From: Erick Wodarz
[mailto:db2udbdba-ezmlmshield-x50521594.[Email address protected]
Sent: Monday, April 25, 2005 12:51 PM
To: LazyDBA Discussion
Subject: RE: Leading Zeros
Do CHAR(INTEGER(COLUMN)). You'll want to check for Null's, empty strings,
etc...
ERick
-----Original Message-----
From: Ather Mudassar
[mailto:db2udbdba-ezmlmshield-x78948195.[Email address protected]
Sent: Monday, April 25, 2005 1:49 PM
To: LazyDBA Discussion
Subject: Leading Zeros
Hello guys - Does anybody know if there is anyway to eliminate leading
zeros in SQL?
For example, if the SQL result is:
001 the SQL should produce only 1
If it is 010, it should produce 10
If it is 0100, it should produce 100?
Regards,
_________________
Mudassar Ather
---------------------------------------------------------------------
PLEASE CLICK REPLY-ALL TO SEND A REPLY TO EVERYONE
website: http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
---------------------------------------------------------------------
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