开发者

SQL Server data types equivalent to Oracle?

I have Oracle 10g database table as a source. I'm planning to extract data from this table and insert into SQL Server table. Oracle table contains these data types

NUMBER
NUMBER(2, 7)
LONG

Which ar开发者_C百科e equivalent data types to these in SQL Server?


I was dealing a lot with importing exporting data in and our of MSSQL <-> Oracle and the simplest but also most accurate representation of a data type comparison was this one: http://download.oracle.com/docs/cd/B19306_01/gateways.102/b14270/apa.htm

In your case you need to do the following:

  • analyse the the field with the type NUMBER and try to find the scale/precision (might be server default values)
  • if you can't figure it out, analyze the values in the column and retrieve the maximum scale and precision from that
  • Then create a NUMERIC field with that scale/precision in your MSSQL table

In General, the simplest way an oracle NUMBER is represented by the NUMERIC type. But in some cases the values are actually boleans, integers etc.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜