Home » SQL & PL/SQL » SQL & PL/SQL » Oracle Number length to SQL Numeric length
Oracle Number length to SQL Numeric length [message #635738] Tue, 07 April 2015 21:26 Go to next message
giszzmo
Messages: 1
Registered: April 2015
Junior Member
Hi, We are in the process of bringing our data over from Oracle to SQL so now some of the conversions are coming out differently. I need to make them the same in SQL as they were intended in Oracle. One such conversion I have is

Oracle
Datatype Length Precision Scale
number 22

SQL
Datatype Length Precision Scale
numeric 17 38 0

I understand how it got 38 and 0 but I don't understand how it got the length of 17. Also, how would I change it (on the SQL side) to match that of Oracle? If anyone could point me in the right direction. Thanks!
Re: Oracle Number length to SQL Numeric length [message #635739 is a reply to message #635738] Tue, 07 April 2015 21:49 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
> Also, how would I change it (on the SQL side) to match that of Oracle?
The problem & solution have NOTHING to do with Oracle database.
Please go post this in some SQL Server forum; not here.
Re: Oracle Number length to SQL Numeric length [message #635740 is a reply to message #635739] Wed, 08 April 2015 00:19 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
giszzmo

Reported By: giszzmo On: Wed, 08 April 2015 04:53 In: SQL & PL/SQL » SQL & PL/SQL » Oracle Number length to SQL Numeric length
Reason: <censored by LF> ... and my question is in the right forum.


The truth is: people here speak Oracle, not MS SQL Server. Your questions are related to MS SQL Server:giszzmo

SQL
Datatype Length Precision Scale
numeric 17 38 0

I understand how it got 38 and 0 but I don't understand how it got the length of 17. Also, how would I change it (on the SQL side) to match that of Oracle?

That's why you should ask people who use MS SQL Server. We don't know the answer as we don't use that RDBMS.

However, someone might be experienced in both database systems and will be able to assist. I'm not one of them, neither is BlackSwan. I can't even remember that any of regular members is (and I'm visiting this forum for ages). So, be patient ... hopefully, someone will assist. Or, ask the question on one of MS SQL Server forums. I believe your chances are far better there than here.
Re: Oracle Number length to SQL Numeric length [message #635792 is a reply to message #635740] Wed, 08 April 2015 18:58 Go to previous message
WayCal
Messages: 2
Registered: December 2013
Location: California US
Junior Member
Giszzmo,

The smallest precision decimal datatypes requires 5-bytes to store.
The largest requires 17-bytes.

That's where the 17 comes from.

Sorry for the typing ... I'm on a phone.

Wayne
Previous Topic: need help for oracle sql
Next Topic: saving query Output in a single variable
Goto Forum:
  


Current Time: Tue Apr 23 05:21:35 CDT 2024