02-04-2017 10:16 AM
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?
%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:
02-06-2017 06:11 AM
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.