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
Amethyst | Level 16

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!

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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