Transforming DATE field from text file to Oracle

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pxraja
Participant
Posts: 142
Joined: Fri Mar 14, 2008 10:22 am

Transforming DATE field from text file to Oracle

Post by pxraja »

Hi all,

I am trying to transform the data from text file to ORACLE10g database, its simple transformation, no manipulation is done. I am using SEQ->TRF->ODBC stages to do this. I am enabling create table in ODBC Stage. Its creates the DATE datatype for DATE FIELDS. If I am creating the Oracle table with TIMESTAM datatype for Date fields also , The following error occurs



TESTY..xxxxxxxxxxx_Trf.Lnk_Trg_xxxxxxxxxx: DSD.BCIPut call to SQLExecute failed.
SQL statement:INSERT INTO xxxxxxxx.TESTX("Region", "Location", "CSCCode", "AgentCode", "Distribution", DOJ, "MST_Name", "Policy_No", WRP, "Issuedate", "Proposal_Date", "CNT_Type", CLNTNUM, CLNTNAME, "Month") VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
SQLSTATE=22008, DBMS.CODE=0
[DataStage][SQL Client][ODBC][DataDirect][ODBC Oracle Wire Protocol driver]Datetime field overflow. Error in parameter 6.

Region = "xxxxxxxxxx"
Location = "xxxxxxxxx"
CSCCode = "xxxxx"
AgentCode = "xxxxxxxx"
Distribution = "xxxxxxxxxxx"
DOJ = "28/3/2006 0:00:00"
MST_Name = "xxxxxxxxxx"
Policy_No = "xxxxxxxx"
WRP = xxx
Issuedate = "11/4/2008 0:00:00"
Proposal_Date = "5/4/2008 0:00:00"
CNT_Type = "xxxx"
CLNTNUM = "xxxxx"
CLNTNAME = "xxxxxxxx"
Month = "April08"

I had seen the earlier post, but I want to resolve the issue

Suggestions are most welcome

Thanks in Advance
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Date (except within Oracle) is not the same thing as Timestamp. The ODBC driver enforces this difference. Turn your date into a timestamp using appropriate Transform (TIMESTAMP).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply