BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
nitink26
Obsidian | Level 7

Hi,

 

I need help as I want to read 10000 Char text in SAS and insert into Oracle table -

  • How to SAS can read 10000 character field from flat file?
  • and how can I insert this field to Oracle table (Oracle VarChar2 is limited to 4000 char long string) once read the variable?

 

Can someone help me with the code?

 

Thanks!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Tom
Super User Tom
Super User

Have your checked your DBMAX_TEXT setting?

Either on the LIBNAME statement or as a dataset option.

View solution in original post

4 REPLIES 4
nitink26
Obsidian | Level 7

 

I can read the 10000 character variable from sas but unable to put into the oracle table.

Tom
Super User Tom
Super User

Have your checked your DBMAX_TEXT setting?

Either on the LIBNAME statement or as a dataset option.

nitink26
Obsidian | Level 7
This option doesn't apply for oracle varchar2 ---
Restrictions: This option applies when you retrieve, append, and update rows in an existing table. It does not apply when you create a table.
This option is ignored for CHAR, VARCHAR, and VARCHAR2 (Oracle) data types.
LinusH
Tourmaline | Level 20

Do I understand it correctly that the varcghar2 column has a defined max length of 4000?

And that can't be extended?

"Variable-length character string having maximum length size bytes or characters. You must specify size for VARCHAR2. Minimum size is 1 byte or 1 character. Maximum size is:

  • 32767 bytes or characters if MAX_STRING_SIZE = EXTENDED

  • 4000 bytes or characters if MAX_STRING_SIZE = STANDARD"

     

So question is are you willing to truncate the variable to 4000 chars? If so, there should not be a problem inserting it into Oracle (substr).

 

 

Data never sleeps

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 896 views
  • 1 like
  • 3 in conversation