dbTalk Databases Forums  

DTS against Oracle table having NUMBER column

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss DTS against Oracle table having NUMBER column in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Torkild Hagen
 
Posts: n/a

Default DTS against Oracle table having NUMBER column - 01-05-2006 , 06:36 AM






Hi.

I am trying to run a simple SQL Server 2005 Integration Services package
against
a single Oracle database table.
The table has several columns having datatype NUMBER without any precision.

When trying to open the Columns tab in the OLE DB Source Editor I get an
error telling me that the output column has a precision that is not valid.
In other words, the precision has to be between 1 and 38, while the actual
precision
in Oracle is 0.

Anyone have any workarounds for this ?
(Beyond making a copy of the table in Oracle with some precision defined for
the difficult columns)

Kind Regards,
Torkild Hagen

Reply With Quote
  #2  
Old   
Ian Goodchild
 
Posts: n/a

Default Re: DTS against Oracle table having NUMBER column - 01-05-2006 , 11:56 AM






Quote:
Anyone have any workarounds for this ?
(Beyond making a copy of the table in Oracle with some precision defined for
the difficult columns)
Not sure if this is beyond, but you could try creating a view on top of the
fact table and then using the CAST function on the column which I think is
ANSI SQL so should work on anything

e.g.

CREATE OR REPLACE VIEW OLAP_VIEW
(OLAP)
AS
SELECT CAST(1 as NUMBER(20,5)) "OLAP" FROM dual


Reply With Quote
  #3  
Old   
Torkild Hagen
 
Posts: n/a

Default Re: DTS against Oracle table having NUMBER column - 01-06-2006 , 02:25 AM



Hi Ian,

and thanks for the swift response.

I tried your solution. It failed but gave me an idea.
I typecasted to VARCHAR2 instead, and then let SSIS implicitly cast it back on
the way into SQL Server 2005. This works like a charm

Once again, thanks a bunch !



"Ian Goodchild" wrote:

Quote:
Anyone have any workarounds for this ?
(Beyond making a copy of the table in Oracle with some precision defined for
the difficult columns)

Not sure if this is beyond, but you could try creating a view on top of the
fact table and then using the CAST function on the column which I think is
ANSI SQL so should work on anything

e.g.

CREATE OR REPLACE VIEW OLAP_VIEW
(OLAP)
AS
SELECT CAST(1 as NUMBER(20,5)) "OLAP" FROM dual


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.