if you want to avoid the extra spaces at the end trim() and or alltrim() is your friend.
Koen 2017-11-27 17:43 GMT+01:00 <[email protected]>: > 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)) > [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/CACUu1Sudtuego0vLG4_=hb_oupebuyktccsqlm6rnsjb21k...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

