Hello everybody.
I need to import a SQL Server table in SAS. I've done this import with an ODBC connector, but in SQL Server table, there are rows with special characters, like ç, á, é, í...
When I've imported this table to SAS, all the values with special char have changed. For example the value ÍNDIO was changed for ¿NDIO.
How do I solve this problem with special character?
Are there any people with the same problem?
Import code is like this.
proc sql;
connect to odbc as mycon
(datasrc=ora7 user=testuser password=testpass);
create table SAS_TABLE as
select * from connection to mycon
(select * from sasdemo.employees);
disconnect from mycon;
quit;
Thank you so much.
Best regards,
Hi,
which encode configuration you are using in your SqlServer database?
It seems to me that you have encoding problem. Maybe this link can help you: http://support.sas.com/kb/36/652.html
To understand more about encoding:
Hi,
which encode configuration you are using in your SqlServer database?
It seems to me that you have encoding problem. Maybe this link can help you: http://support.sas.com/kb/36/652.html
To understand more about encoding:
Hello @Mozart_Sindeaux,
I concur with @thiagoglima, the link provided should be able to help you.
You need to focus on: the encoding (specially if single-byte or double-byte) from origin data source (MSQL) and destination (the SAS table, bases in your SAS sessions encoding, which you can check with %put _ALL_;
Then, you need to use the transcoding.
Indeed, problem is that SAS-ODBC connections have trouble with trans-coding but the referred SAS note 36652 provides a great example to workaround it.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.