Just an interesting find I wanted to share. When I create my cursor
with traditional c(N) widths, the CSV export does NOT have any extra
spaces added to the output.
pseudoid,zip3,prov03,prov03other,prov06,prov07,prov07other,prov08
"Pseudo1","333","C001","","10","C021","","C025"
"Pseudo2","333","C001","","20","C021","","C026"
"Pseudo3","333","C001","","30","C021","","C019"
But when I use varchar v(N) field declarations, it appends spaces to the
end of the field values:
pseudoid,zip3,prov03,prov03other,prov06,prov07,prov07other,prov08
"Pseudo1 ","333","C001","
","10 ","C021","
","C025"
"Pseudo2 ","333","C001","
","20 ","C021","
","C026"
"Pseudo3 ","333","C001","
","30 ","C021","
","C019"
Here's the declaration:
CREATE CURSOR curProvData (iid i, PseudoID c(20), Zip3 c(3), Prov03
c(4), Prov03Other c(254), Prov06 c(8), Prov07 c(4), Prov07Other c(254),
Prov08 c(4))