ORA-01850: hour must be between 0 and 23

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
John Daniel
Participant
Posts: 42
Joined: Mon Oct 15, 2007 10:35 pm
Location: Charlotte
Contact:

ORA-01850: hour must be between 0 and 23

Post 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
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post 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 ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
John Daniel
Participant
Posts: 42
Joined: Mon Oct 15, 2007 10:35 pm
Location: Charlotte
Contact:

ORA-01850: hour must be between 0 and 23

Post 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'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Oconv(Iconv(InLink.MyDate, "DDMY"), "D-YMD[4,2,2]") : " 00:00:00"
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