DATA Step, Macro, Functions and more

Problem to import txt data into SAS

Reply
Frequent Contributor
Posts: 142

Problem to import txt data into SAS

Hello friends

I have a problem.

I am using tera data query in order to create a table that contains 3318 rows.

I am exporting the table to a txt file.

Then I am using in SAS: File--Import data  and I get only 3281 rows.

As you can see  number of rows is not matched to original table.

I checked what happened and found that some rows values are located in specific field.

What do you suggest in order to solve this problem please?

 

 

 

Valued Guide
Posts: 580

Re: Problem to import txt data into SAS

You have to post code and log, so that we see what actually happened.

Super User
Super User
Posts: 9,599

Re: Problem to import txt data into SAS

How are you exporting the data, and to what format.  If you export a CSV file, and your data contains commas, then you will obviously have issues.  In these cases you can either enclose the data with commas in double quotes so the reader knows to read the whole block without delimeters, or you can switch to a delimeter that is not in your data, for example a pipe.  How you do this in teradata, well there should be an option at export to specify the delimiter.  

If of course its not the above then post some actual information about your problem, otherwise we are just guessing.

Ask a Question
Discussion stats
  • 2 replies
  • 48 views
  • 0 likes
  • 3 in conversation