Desktop productivity for business analysts and programmers

Moving SAS tables to Oracle DB

Accepted Solution Solved
Reply
Contributor
Posts: 35
Accepted Solution

Moving SAS tables to Oracle DB

[ Edited ]

Hi I have a SAS dataset in a temp work library and I want to move this table to Oracle DB.

Here's the code I run and I got below error message.

 

proc sql;

create table oracle.new_data as

select * from work.orig_data;

quit;

 

ERROR: Error attempting to CREATE a DBMS table. ERROR: ORACLE execute error: ORA-01727: numeric precision specifier is out of range (1 to 38)..

 

After some test runs, I identified that fields with below formats seems to be the issue for above error msg, but I can't figure out how to resolve this problem. Does anyone know how to possibly reformat (?) or do something to move this data in temp work library to Oracle DB?

 

Type

Len

Format

Num

8

F40.2

 

Thanks!


Accepted Solutions
Solution
‎08-23-2017 07:43 AM
Super User
Super User
Posts: 8,174

Re: Moving SAS tables to Oracle DB

Never heard of that format.  Is the data actually length 40?  If it is shorter then simply re-applying the format with a shorter length should fix it, however if it is that length then you would lose display of some of the data, and you would still get the message.

proc datasets library=work;
  modify have format thevar f30.2;
run;
quit;

View solution in original post


All Replies
Super Contributor
Posts: 460

Re: Moving SAS tables to Oracle DB

This is the most helpful reference I can find to a format I admit I'd never heard of before http://support.sas.com/kb/35/058.html

Solution
‎08-23-2017 07:43 AM
Super User
Super User
Posts: 8,174

Re: Moving SAS tables to Oracle DB

Never heard of that format.  Is the data actually length 40?  If it is shorter then simply re-applying the format with a shorter length should fix it, however if it is that length then you would lose display of some of the data, and you would still get the message.

proc datasets library=work;
  modify have format thevar f30.2;
run;
quit;
Contributor
Posts: 35

Re: Moving SAS tables to Oracle DB

Thank you RW9! This worked for me!! Smiley Very Happy

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 227 views
  • 2 likes
  • 3 in conversation