BookmarkSubscribeRSS Feed
gianlucA
Calcite | Level 5

I'm using SAS 94 EG on Linux, I use ODBC driver to connect to Microsoft SQL SERVER

when I use proc sql to insert record the text variable [titolo_piano] appair in chinese !!! but no error on log :

there are some others parameters i have to put on libname statement or some encoding reference?

Thank's

%let uid=xxx;
%let pwd=yyy;
libname libColl odbc noprompt="uid=&uid.;pwd=&pwd.;dsn=jjjjj;schema=dbo;" readbuff=100 sql_functions=all;
data test;
   wave_corr=999999;
   IDPiano="ID001";
   fase=1;
   titolo_piano="This is an example of text I wont to insert";
   output;
run;
proc sql;
   INSERT INTO libColl.Best_Practice (wave_corr, IDPiano, fase, titolo_piano) SELECT wave_corr, IDPiano, fase, titolo_piano from test;
quit;

this is the result:

 

 

image001.jpg

2 REPLIES 2
JuanS_OCS
Azurite | Level 17

Hello,

 

in general, the ODBC connection seems to work fine. 
For that error with chinesse characters, could you compare this field with the one in the database itself?

 

Also, for getting more information on the database, maybe you would like to use something as:

options SASTRACE= ',,,d' SASTRACELOC=SASLOG; 

Feel free to read more at: http://support.sas.com/documentation/cdl/en/engfedsrv/70118/HTML/default/n167fxh8cc9h2an198cln7b46vb...

 

And the last, probably you would like to help from a DBA (database administrator) to help you out here. It could be that the character set, the encoding or formats between SAS and your database are misaligned.

BLC
Fluorite | Level 6 BLC
Fluorite | Level 6

Did you find a solution? I have the same problem.

Thanks!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1572 views
  • 1 like
  • 3 in conversation