number to decimal conversion

I am working orchestrate schema files to import files into SQL Server.
This question has to do with datatypes.

The export (from an ORACLE database) says number() as a datatype.
The orchestrate system allows only decimal(s,p).

What is the maximum allowable scale and precision) to be able to define what the number() limits could be?  or is this basically an integer??
Thank you.
Evan CutlerVolunteer Chief Information OfficerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Brian CroweDatabase AdministratorCommented:
Here is a link to the datatype definition:


decimal(p, s) where p = precision and s = scale
0 <= p <= 38
0 <= s <= p
Guy Hengel [angelIII / a3]Billing EngineerCommented:
for oracle (which I think the question is):
... with up to 38 significant digits ...

so it's the same (which is actually defined by the standards...)
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
I know how to define the datatypes....

my problem is that the inbound datafields are described as number().

I can't send outbound datafield as decimal() due to errors saying "where's the scale and precision?"

What do I use when I don't have this?
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

Guy Hengel [angelIII / a3]Billing EngineerCommented:
for "number()" is by default (38,0) ....
not sure if you can override it in your tool
Brian CroweDatabase AdministratorCommented:
You will need to evaluate the data coming in.  Basically you have a maximum of 38 digits to work with and you just need to decide how many need to be on either side of the decimal.  For example, if you're dealing with currency then 6 significant digits to the right of the decimal should be more than enough so use decimal(38,6).  Obviously the more significant digits you use the more space the value will take to store.

johnsoneSenior Oracle DBACommented:
number() is not equivalent to number(38,0).

As per the documentation (

The absence of precision and scale designators specifies the maximum range and precision for an Oracle number.

I believe that would make number() equivalent to number(38,38).

You can quite easily prove that with this simple case:

create table x (y number);
insert into x values (1.234);
insert into x values (1.2345);
insert into x values (1.23456);
insert into x values (1.234567);
insert into x values (1.2345678);
insert into x values (1.23456789);
insert into x values (1.234567891);
insert into x values (1.2345678901);
insert into x values (1.23456789012);
insert into x values (1.234567890123);
insert into x values (1.2345678901234);
select * from x;

Open in new window

You will see that you get all the decimal values.  If you change the datatype of the table to number(38,0), then run the test case, you will get back all 1s as all the data is converted to number(38,0).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Evan CutlerVolunteer Chief Information OfficerAuthor Commented:
I had to go this route.
The data coming in changes every time, and I don't want to have to rebuild my solution to accommodate.

ThAnks guys.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.