BookmarkSubscribeRSS Feed
Hhh111
Calcite | Level 5

Hi,

 

I need help how to include special character that extracted from Oracle database. I've used Encoding as per below script, however symbol like "1/2" interpreted as "?" in SAS.

 

ERROR.PNG

 

PROC SQL NOPRINT;
                CONNECT TO ODBC (DSN=OracleODBC UID='XXX' PWD='12345');

                CREATE TABLE TEST (COMPRESS=YES ENCODING='UTF-8') AS 
                
                SELECT     *
                FROM CONNECTION TO ODBC 
                (
                SELECT     *
                FROM &TABLE 
	
                )

                ;
                DISCONNECT FROM ODBC;
QUIT;
RUN;
3 REPLIES 3
smantha
Lapis Lazuli | Level 10

Is your SAS session UTF-8 /unicode if not eevnthough the data read is utf-8 it may not display correctly in your session. you can change this by changing the encoding option.

Hhh111
Calcite | Level 5
Hi Smantha,
TQ for your reply.
when I run below script, it shows that my SAS session is = LATIN1

proc options option=encoding; run;

may I know what encoding option do I have to change to ensure SAS captured the special character from Oracle?

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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