I am trying to get data from a SQL query and items like zip codes or SSNs have leading zeroes. The correct digits show in a CSV file but if opened in Excel the leading zeroes are dropped by default.
My vendor is requesting that I output the field in a TEXT format so that Excel does not drop the zeroes.
How do you format the SQL statement to accomplish this?
I have tried adding a leading and trailing double quote (") and then in Excel when opening the CSV telling it that a double quote is a text delimiter, but it still drops the zeroes.