BookmarkSubscribeRSS Feed
milts
Pyrite | Level 9

I have a SQL Server table with chinese characters in it. I am able to view it properly through Base SAS (Unicode Suppport), but when I try to open it in Enterprise Guide, I hit the error "Unable to transcode data to/from UCS-2 encoding" upon clicking the dataset.

 

 


libname mydb odbc noprompt="driver=sql server;server=mysrv/db;uid=sa;pwd=pwd;database=mydb;" schema=dbo;

Greatly appreciate any inputs on this.

 

Thanks!

5 REPLIES 5
Ksharp
Super User

Change your SAS encoding into UTF-8 .

milts
Pyrite | Level 9

The default is already in UTF-8.

 

I managed to resolve it by adding read permissions to the library and table itself in SMC and pre-assigning the library with metadata engine. 

 

I find it strange though that sometimes the error appears when you first open the table but once it's in the process flow it can actually be viewed properly.

Ksharp
Super User
Make sure SAS has the same encoding with SQL .
milts
Pyrite | Level 9

Is it the collation in SQL Server? The database is Latin1_General_CI_AI and I can view chinese characters when I query in SQL Management Studio.

 

I'm actually able to view them now in SAS EG also, but when I filter by dates I get thrown again to a similar error.

Ksharp
Super User

It is most likely unprinted character problem. E.X. you have half of a chinese word or a illegal character  for EG.

If that was it, you need clean your data before using EG.  

 

Also see if you could print it in HTML destination.

 

 

ods html;

proc print data=have(obs=100);run;

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 5 replies
  • 2469 views
  • 0 likes
  • 2 in conversation