code_junkie

How do I get back a 2 digit representation of a number in SQL 2000

Nov 11th, 2011
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. SELECT REPLACE(STR(mycolumn, 2), ' ', '0')
  2.  
  3. select case when mycolumn between -9 and 9 then '0' + str(mycolumn) else str(mycolumn) end
  4.  
  5. select right('0'+ltrim(str(n)),2)
  6.  
  7. select right(str(100+n),2)
Add Comment
Please, Sign In to add comment