Zerofill

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sonia.sardana
    New Member
    • Jul 2006
    • 95

    Zerofill

    Hi frnds, I want to know that zerofill is a valid function in SQL or not....
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    I think that's a MySQL function. If that's a function that left-pad the value with '0', you can still re-create it in sql-server. Something like:

    Code:
    SELECT right('0000000000' + rtrim(ltrim(cast(@myInt as varchar(10))),10)
    -- CK

    Comment

    Working...