BookmarkSubscribeRSS Feed
deleted_user
Not applicable
HI all,

I have problems with appending a SAS Data set to an oracle table.
Connection to the Oracle-database via the LIBNAME-statement works fine, also the table definition in ORACLE fits with the format definition of my SAS-table at first view. But when I execute a PROC CONTENTS statement on the ORACLE table the column definitions are not the same as in the ORACLE definition (e.g. character 40 in SAS instead of character 30 in ORACLE and so on).
So I always receive warnings in response to my PROC APPEND statement because of different lengths on BASE and DATA files, though the definitions look OK as I mentioned above.

Does anybody know how to solve this problem?

Thanks in advance,
Chris
5 REPLIES 5
Reeza
Super User
have you tried the force option?
Patrick
Opal | Level 21
Hi

From what you describe it's not the format but the length of the character variables which are different. So PROC APPEND is kind of right to issue a truncation warning.

The best solution would be to define the lengths in your SAS data set according to the ones in the ORACLE table.

If this is not possible and you're sure that the columns lengths in ORACLE are sufficient then you could use PROC APPEND NOWARN; to suppress the warnings. Not pretty - but it should work.

HTH
Patrick
Ksharp
Super User
Hi.Patrick.
Long time no see your posting.
Happy Holidays!


Ksharp
Patrick
Opal | Level 21
Hi Ksharp
Yes, real life projects kept me too busy.
Merry Chrismas and happy New Year to you.
Cheers
Patrick
omBoy
Calcite | Level 5
Hi. I've used proc append + force + nowarn and it was only partly successful. It supressed most of the warnings except for the data type mismatch (i.e. col1 in BASE has different lengths with that of DATA). Is there a way to suppress this too? Is it documented somewhere why this type of warning is not being suppressed?

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 2893 views
  • 0 likes
  • 5 in conversation