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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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