Insert into Date column in Oracle

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Insert into Date column in Oracle

Post by mac4rfree85 »

Hi Guys,

My source is a Flat file. The Input column sample value is 2011-07-16. I am reading it as Date.

My Target is Oracle table. This column is a part of Primary Key. I directly mapped the column. But i am getting the following error.

Code: Select all

Oracle_Connector_43,0: The OCI function OCIStmtExecute returned status 1. Error code: 1722, Error message: ORA-01722: invalid number.
I even tried to read it as Varchar and convert it to Date using StringToDate(Columnname) function. Still i am getting the following error.

Also CurrentDate() is also giving me the same error.

Can somebody guide me as what i am doing wrong.

Cheers!!!
Mac4rfree
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Hi mac4rfree85,

is the column mentioned the only column in your stream?

The error-message does not specify a column explicitly, but it complains about an 'invalid number', not a date.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
mac4rfree85
Participant
Posts: 126
Joined: Thu Jul 01, 2010 11:39 pm

Post by mac4rfree85 »

Hi,

Yeah i too saw that. But i have hardcoded 'X' for all Varchar and Char columns and 0 for Decimal. Apart from this, there is only one Date column which i guess should be the issue.
Now, even CurrentDate() column is giving the same "Invalid Number" issue.

Can somebody help me out with this.
Mac4rfree
Post Reply