Page 1 of 1

ORA-01850: hour must be between 0 and 23

Posted: Thu Jul 08, 2010 6:10 am
by John Daniel
I have a source like this

0126109,0719849,08-AUG-1998
0376135,2195025,08-AUG-1998

I'm trying to load the data in to DB- by using OCI.

I'm getting a warning in the DS Director 'ORA-01850: hour must be between 0 and 23'

Kindly let me know how can i come out from this issues.

Thanks in advance

Regards,
John Daniel

Posted: Thu Jul 08, 2010 6:24 am
by Sainath.Srinivasan
Your data does not have an hour (or time) part.

What are the target datatypes and how they are mapped ?

Also what is the target insert SQL ?

Posted: Thu Jul 08, 2010 7:43 am
by chulett
Assuming a DATE target, use IConv/OConv to convert to an ISO timestamp and add an explicit zero time:

YYYY-MM-DD HH24:MI:SS

This will work regardless of the NLS_DATE_FORMAT of the target database providing you let DataStage generate the SQL.

ORA-01850: hour must be between 0 and 23

Posted: Mon Jul 12, 2010 1:41 am
by John Daniel
Sainath.Srinivasan wrote:Your data does not have an hour (or time) part.

What are the target datatypes and how they are mapped ?

Also what is the target insert SQL ?
*************************************************************
You mean that data has no time specified ?? if the data is same how can I load the data ???
Target DB is Oracle and its is a truncated load. its a straight drive...just a straight mapping from source to target .....

Target SQL is tool generated sql..Options are 'Generate Update action from Option and Columns tabs' and 'Truncate table then insert rows'

Posted: Mon Jul 12, 2010 1:55 am
by ray.wurlod

Code: Select all

Oconv(Iconv(InLink.MyDate, "DDMY"), "D-YMD[4,2,2]") : " 00:00:00"