BookmarkSubscribeRSS Feed
saslover
Calcite | Level 5
I have an issue.. I am using the ODBC with proc sql. This is my code
proc sql noprint;
connect to odbc
as atest (noprompt="DRIVER=Microsoft Excel Driver (*.xls);
DBQ=xxxxx.xls;");
create table day4 as
select * from connection to atest
(
select * from "abc tensile test 6-2-11.is$"
);
disconnect from atest;
quit;

Now the excel file reads in, but in my original data file I have some values for id that have 201 202 203 R201 R202. So SAS gives me missing values for all the character variables but reads in only numeric.

How do I define conversion of numeric to character variable inside my data step above in proc sql.

Any help is appreciated

Thanks
3 REPLIES 3
Reeza
Super User
That seems cumbersome.

I suggest using proc import with type = mixed.
saslover
Calcite | Level 5
I cannot do that. My dataset has a whole lot of junk characters in the sheets and they are not similar across all excel files. So PROC IMPORT doesn't work.
Reeza
Super User
I think the dbtype= option might be what you want then.

I don't know exactly wwere/how but hopefully google can help some more.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

Health and Life Sciences Learning

 

Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.

LEARN MORE

Discussion stats
  • 3 replies
  • 2179 views
  • 0 likes
  • 2 in conversation