Home Forums Article Discussions Article Discussions by Author Discuss Content Posted by Jeff Moden Hidden Formatting Troubles with STR() (SQL Spackle) RE: Hidden Formatting Troubles with STR() (SQL Spackle)
Carlo Romagnano
SSC-Insane
Points: 22605
More actions
December 15, 2010 at 1:29 am
#1262666
I always use this this syntax:
RIGHT('0000000000' + CAST(SomeNumber AS VARCHAR(10)),10)
Because I didn't know that STR() is also used for formatting, I thought it only converts string to number.