BookmarkSubscribeRSS Feed
Obsidian | Level 7 DCL
Obsidian | Level 7

I have a requirement to copy some oracle data from one table to another using SAS.

I am using the following libname statement to retrieve the oracle tables present in the schema-uuu

Libname xxx ORACLE USER=yyy PASSWORD=vvv SCHEMA=uuu PATH=www;

One of my Oracle table has a field with data type as float. But when they are transformed to a SAS dataset, this field is transformed to a numeric variable with format best12. . As a result the value .00000081147986 in oracle table becomes 8.1147986E-6 in the sas dataset.

Is there a way by which I can specify the format of a numeric value in the libname statement to make it best22. similar to DBMAX_TEXT option.

Thanks in advance!
Opal | Level 21

I think this is a case where you should use Proc SQL Passthrough facility. It doesn't make a lot of sense to me to first load everything from Oracle into SAS only to reload it directly into another Oracle table (without any transformation steps).

You could for example develop your code using SQLDeveloper (free tool, can be downloaded from Oracle) or TOAD. Looks like this would be a simple SQL INSERT or eventually a UPSERT.

Once you've got working Oracle SQL you just paste it into a PROC SQL passthrough block.

Patrick Message was edited by: Patrick

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!
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
  • 1 reply
  • 2 in conversation