BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
monicluder
Fluorite | Level 6

Hello!

I know there is the length limit for char variable (1024 positions); but if I have to import a field of a data base Oracle which contains  a text (NVARCHAR), is there a tricks to do it? I use proc sql or data step.

Thanks a lot!

1 ACCEPTED SOLUTION

Accepted Solutions
Patrick
Opal | Level 21

According to the Oracle documentation NVARCHAR won't exceed 32767 bytes and though can fit into a single SAS character variable. 

Follow @SASKiwi's recommendation and set  DBMAX_TEXT to 32767. That should resolve the issue.

View solution in original post

4 REPLIES 4
SASKiwi
PROC Star

Looks like you have run into the SAS option DBMAX_TEXT default setting of 1024. You can increase this to 32767 but no more than that as that is the size limit of SAS character variables.

 

How are you connecting to Oracle? The DBMAX_TEXT option can be used in database CONNECTION and LIBNAME statements.

monicluder
Fluorite | Level 6
Great! I didn't find this option, thanks a lot SASkiwi
Patrick
Opal | Level 21

According to the Oracle documentation NVARCHAR won't exceed 32767 bytes and though can fit into a single SAS character variable. 

Follow @SASKiwi's recommendation and set  DBMAX_TEXT to 32767. That should resolve the issue.

monicluder
Fluorite | Level 6
Great! I didn't find this option, thanks a lot Patrick

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 546 views
  • 5 likes
  • 3 in conversation