Dear,
I have a column on an sql query and I want to add either one or two zeros before the numbers in my SQL query result depending on length of the value.
Column results have a max of 7 digit numbers in it but at times it will only have 5, 6 or 7.
So when a number result is 12345 I want it to show up as 0012345, or when it's 123456 I want it to show as 0123456, or if it's 1234567 then nothing changes.How can we achieve this in Microsoft Sql Server.
RomRyan
*This post is locked for comments