Numeric data is not returned from SQL Server with leading zeroes. The only
way that leading zeroes can occur is if the data is formatted as character.
Assuming you have a character string with leading zeroes, and you want to
strip off these leading zeroes, you might try something like:
declare @John varchar (10)
set @John = '0012345'
select substring (@John, patindex('%[^0]%', @John), 10)
-------------------------------------------
BP Margolin
Please reply only to the newsgroups.
When posting, inclusion of SQL (CREATE TABLE ..., INSERT ..., etc.) which
can be cut and pasted into Query Analyzer is appreciated.
"John" <Jheadst...@yahoo.com> wrote in message
news:000f01c2d1f9$95b3ddd0$a501...@phx.gbl...