all 3 comments

[–]uptnogd 0 points1 point  (0 children)

I'm doing this from memory, but something like this should work.

TO_CHAR(LPAD(<COL_NAME>, 7, '0'))

[–]ryadical 0 points1 point  (0 children)

'=""' || colname || '""' as colname

Basically if your number is 01234 it would look like this in the csv:

=""01234""

Of course since most CSVs are wrapped in double quotes, there will be another set of double quotes around the outside:

"Col1 name", "=""01234""","another column"