I am having trouble getting a char(7) that is converted to an integer to pad with zeroes in SQL Server 7.0. The statement is as follows:
convert(char(7),RIGHT('0000000'+convert(char(7),convert(integer,isnull(tblname.column*100,0))),7))
This works correctly on 6.5, but when I test on 7.0 the numbers come out as either 0 or a number, neither padded.
This is a stored procedure that sets ansi_defaults off and I believe this is the problem.
Any suggestions?
convert(char(7),RIGHT('0000000'+convert(char(7),convert(integer,isnull(tblname.column*100,0))),7))
This works correctly on 6.5, but when I test on 7.0 the numbers come out as either 0 or a number, neither padded.
This is a stored procedure that sets ansi_defaults off and I believe this is the problem.
Any suggestions?