|
|||
|
Hi everybody
I need to output a file in .txt format where all the variables have quotation marks around them. In my final step I do this: proc sql; create table final as select compress(quote(field_1b)) as field_1, compress(quote(field_2b)) as field_2, compress(quote(field_3b)) as field_3, compress(quote(field_4b)) as field_4, compress(quote(field_5b)) as field_5, compress(quote(field_6b)) as field_6, compress(quote(field_7b)) as field_7 from cust_id; quit; So I have quotation marks wrapped around the values. But when I output the file the result is like this: """CMBO""","""1234567890""","""NKC+1234567890"""," ""2990.00""", 12082010,"""DKK""","""""" when it should be like this: "CMBO","1234567890","NKC+1234567890","7500,00","12 082010","DKK","" How can I output the file with a single quotation mark? Anybody knows? Thanks in advance for your help. Styrmir |
|
|
||||
|
||||
|
|
|
|||
|
data _null_ ;
file print dsd ; set sashelp.class ; put (_all_)(~) ; run ; On Monday, July 30, 2012 6:13:57 AM UTC-4, Styrmir wrote: > Hi everybody > > > > I need to output a file in .txt format where all the variables have > > quotation marks around them. > > > > In my final step I do this: > > > > > > proc sql; > > create table final as select > > compress(quote(field_1b)) as field_1, > > compress(quote(field_2b)) as field_2, > > compress(quote(field_3b)) as field_3, > > compress(quote(field_4b)) as field_4, > > compress(quote(field_5b)) as field_5, > > compress(quote(field_6b)) as field_6, > > compress(quote(field_7b)) as field_7 > > from cust_id; > > quit; > > > > So I have quotation marks wrapped around the values. But when I output > > the file the result is like this: > > > > """CMBO""","""1234567890""","""NKC+1234567890"""," ""2990.00""", > > 12082010,"""DKK""","""""" > > > > when it should be like this: > > > > "CMBO","1234567890","NKC+1234567890","7500,00","12 082010","DKK","" > > > > How can I output the file with a single quotation mark? Anybody > > knows? > > > > Thanks in advance for your help. > > > > Styrmir |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|