I have to export a table in fixed format way. When I have numeric field, I have to add leading zeroes.
I know with SQL Server 2012, I can use FORMAT()
. How to do in SQL Server 2005?
For instance, in a column with number 18, with fixed length 10, I have to export:
0000000018