BookmarkSubscribeRSS Feed
atulsingh
Obsidian | Level 7

Hello everyone,

 

I am importing a csv file in sas and one of the observations include data like Datsun_715

when i am importing such mixed data in sas it is only reading Datsun_

and that 715  is not getting read.

what to do? please suggest?

3 REPLIES 3
atulsingh
Obsidian | Level 7

what if i redefine the length of the corresponding variable?

Reeza
Super User

@atulsingh wrote:

what if i redefine the length of the corresponding variable?


If the variable has already been read incorrectly changing the length won't change the underlying value. 

 

Another fix for an 'incorrect' import from CSV Is to make the GUESSINGROWS option big - as large a the file. This means it scans the entire column before deciding on a length and format. 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 791 views
  • 0 likes
  • 3 in conversation