Why does the following TSQL produce different results ?
Query
select right('00000000'+ convert(char(8),123),8)
Results
--------
123
Query
select right('00000000'+ convert(varchar(8),123),8)
Results
--------
00000123
When I ran the sql using SQL6.5, both produced 00000123 !
TIA