Problem with encoding during insert from SAS EG on Linux into SQL SERVER table using ODBC

Reply
New User
Posts: 1

Problem with encoding during insert from SAS EG on Linux into SQL SERVER table using ODBC

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

Trusted Advisor
Posts: 1,141

Re: Problem with encoding during insert from SAS EG on Linux into SQL SERVER table using ODBC

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.

Ask a Question
Discussion stats
  • 1 reply
  • 139 views
  • 0 likes
  • 2 in conversation