ram27
asked on
Get exact number of chars from storedproc
Hi,
I want to retrieve value from database if the value has lessthan 5 digits i need to append zeros to make 5 charact or digit using storedprocedure in Sql server 2005.
example, if database has value as "12", my stored procudure should return "00012".
Basically i need to do something like padding left with '0'.
Can you please help me on this.
thanks,
Ram.
I want to retrieve value from database if the value has lessthan 5 digits i need to append zeros to make 5 charact or digit using storedprocedure in Sql server 2005.
example, if database has value as "12", my stored procudure should return "00012".
Basically i need to do something like padding left with '0'.
Can you please help me on this.
thanks,
Ram.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
from yourtablename