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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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