BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
microeyes
Calcite | Level 5
Hi all,

I am loading data from Oracle to Teradata using SAS pass-through
Code example:
CONNECT TO ORACLE ()
INSERT INTO TDLIB.tblnm(fastload=yes)
Select * from connection to oracle(
Select * from oradb.ora_tblnm
)

In Oracle data is like : 99999999999999.99 (datatyep-Number(20,4)
But after loading in Teradata it gets round of to : 100000000000000.00

Tried with
DATA SET OPTION- DBTYPE
But though getting it like :99999999999999.9872 with decimal (20,4) And 99999999999999.98 with decimal (20,2)

I want it to be loaded as 99999999999999.9900 in Teradata

Need a solution for this.
Thanks.
1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

As soon as you move data through SAS, you are subject to its limits, which means a maximum precision of 15 decimal digits because of the 8 byte real format that SAS uses for numbers.

 

I suggest you find a way to transfer the data more directly. Unload to a text file with proper formatting, and load from that, without using SAS.

View solution in original post

3 REPLIES 3
Peter_C
Rhodochrosite | Level 12
There is little hope that those 00 after .99 would be stored, unless you store it all as string
Kurt_Bremser
Super User

As soon as you move data through SAS, you are subject to its limits, which means a maximum precision of 15 decimal digits because of the 8 byte real format that SAS uses for numbers.

 

I suggest you find a way to transfer the data more directly. Unload to a text file with proper formatting, and load from that, without using SAS.

andreas_lds
Jade | Level 19

Just guessing, but since sas numbers have at max 15 significant digits, some information is lost during transfer.

 

See http://support.sas.com/documentation/cdl/en/hostwin/63285/HTML/default/viewer.htm#numvar.htm for details about how numbers are stored.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 1650 views
  • 0 likes
  • 4 in conversation