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 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!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 3374 views
  • 0 likes
  • 5 in conversation