Abba
2008-11-24 09:49:30 UTC
Hello,
SQLserver Table - Audit_Trx
------------------
[TrxID] [char](11) NOT NULL,
[ProdSKU] [int] NOT NULL,
[AcctNum] [int] NOT NULL,
[InsertDate] [datetime] NULL,
)
Oracle table - TranAudit
------------
TRXID NOT NULL VARCHAR2(11 CHAR)
PRODUCT NUMBER(10)
ACCTNUM NUMBER(10)
INSERTDATE TIMESTAMP(6)
I am trying to load from SQL to Oracle. For that:
(1) I created a "Data Flow task" in SSIS and in the source, I have this
query:
select TrxID,
ProdSKU,
AcctNum,
ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate
from Audit_Trx
(2) Then there is 'Data Conversion' where I have performed the following
conversions:
- TrxID - String[DT-STR]
- ProdSKU - 4 byte signed integer
- AcctNum - 4 byte signed integer
- InsertDate - DT_DBTimeStamp
(3) Then , I have selected the Oracle table as destination.When I select
'table or view' as 'Data access mode', it throws an error that 'datatype is
not supported'. So I have selected 'sql command' as 'Data access mode' and
enterd this:
SELECT Trxid,product,acctnum,
TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate
from TranAudit
In the 'mappings', I have selected the respective 'data conversion.' as
against the Oracle columns.
Question: But this is giving me validation warning that "failure inserting
into read_only column InsertDate". When I remove the InsertDate column from
SQL query and also from Oracle , there are no errors. Also, I tried changing
InsertDate to DT_DATE and DT_DBDATE but still same error.
Can anyone help?
TIA,
Abba
SQLserver Table - Audit_Trx
------------------
[TrxID] [char](11) NOT NULL,
[ProdSKU] [int] NOT NULL,
[AcctNum] [int] NOT NULL,
[InsertDate] [datetime] NULL,
)
Oracle table - TranAudit
------------
TRXID NOT NULL VARCHAR2(11 CHAR)
PRODUCT NUMBER(10)
ACCTNUM NUMBER(10)
INSERTDATE TIMESTAMP(6)
I am trying to load from SQL to Oracle. For that:
(1) I created a "Data Flow task" in SSIS and in the source, I have this
query:
select TrxID,
ProdSKU,
AcctNum,
ISNULL(CONVERT(VARCHAR,getdate(),101),0) as InsertDate
from Audit_Trx
(2) Then there is 'Data Conversion' where I have performed the following
conversions:
- TrxID - String[DT-STR]
- ProdSKU - 4 byte signed integer
- AcctNum - 4 byte signed integer
- InsertDate - DT_DBTimeStamp
(3) Then , I have selected the Oracle table as destination.When I select
'table or view' as 'Data access mode', it throws an error that 'datatype is
not supported'. So I have selected 'sql command' as 'Data access mode' and
enterd this:
SELECT Trxid,product,acctnum,
TO_CHAR(InsertDate,'mm/dd/yyyy') as InsertDate
from TranAudit
In the 'mappings', I have selected the respective 'data conversion.' as
against the Oracle columns.
Question: But this is giving me validation warning that "failure inserting
into read_only column InsertDate". When I remove the InsertDate column from
SQL query and also from Oracle , there are no errors. Also, I tried changing
InsertDate to DT_DATE and DT_DBDATE but still same error.
Can anyone help?
TIA,
Abba