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!
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;
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
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;
Thank you RW9! This worked for me!!
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.