How to PAD with Leading Zeroes
Posted: Thu Oct 05, 2006 11:27 am
Hi All,
Can anyone please help me..
Source is having Varchar(10) and target is Char(10).My Requirement is...
any length of data till length 10 can come from source,and i need to pad this data with leading zeroes followed by that data so that length in target side is remain 10.
Ex.
if data is coming like 12345 then populate 0000012345,
if data is coming like 432 then populate it as 0000000432.
if data is coming like 1234567 then populate it as 0001234567.
Please help me.
Can anyone please help me..
Source is having Varchar(10) and target is Char(10).My Requirement is...
any length of data till length 10 can come from source,and i need to pad this data with leading zeroes followed by that data so that length in target side is remain 10.
Ex.
if data is coming like 12345 then populate 0000012345,
if data is coming like 432 then populate it as 0000000432.
if data is coming like 1234567 then populate it as 0001234567.
Please help me.