inserting timestamp into database

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
sdfasih
Participant
Posts: 39
Joined: Wed May 24, 2006 7:22 pm

inserting timestamp into database

Post by sdfasih »

Hi ,
I am trying to insert 0000-00-00.00.00.00.000000 into oracle database but's its giving me an error "invalid number".
Thanx
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How are you trying to insert it? What is the target Oracle datatype? Details, man, details! :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi,
Oracle does not have a timestamp datatype. Therefore, timestamp fields intended for an Oracle target will need to be converted to a [b]date[/b] datatype.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

lstsaur wrote:Oracle does not have a timestamp datatype.
Oracle has a TIMESTAMP datatype. Been there since 9i, I do believe.
-craig

"You can never have too many knives" -- Logan Nine Fingers
lstsaur
Participant
Posts: 1139
Joined: Thu Oct 21, 2004 9:59 pm

Post by lstsaur »

Hi Craig,
You are absolutely correct. It's time for me to throw away my Oracle 7 Server SQL Language Reference Manual and also to notify Ascential to update their DataStage EE training manual. Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's certainly not a valid number - it has two "-" characters in it for a start. What is the data type of the target column? Are you using generated or user-defined SQL?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gbusson
Participant
Posts: 98
Joined: Fri Oct 07, 2005 2:50 am
Location: France
Contact:

Post by gbusson »

I'm not quite sure that 0000-00-00.00.00.00.000000 is a valid timstamp.

Have u tried 0001-01-01.00.00.00.000000?
sb_akarmarkar
Participant
Posts: 232
Joined: Fri Sep 30, 2005 4:52 am
Contact:

Re: inserting timestamp into database

Post by sb_akarmarkar »

sdfasih wrote:Hi ,
I am trying to insert 0000-00-00.00.00.00.000000 into oracle database but's its giving me an error "invalid number".
Thanx

Is it timestamp or number you are trying to insert :o ....


Thanks,
Anupam
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Yet no answer for the first question asked.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

The error suggests that it is trying to take in a numeric data type column (specified within the datastage), change it to timestamp and see how it works.
Success consists of getting up just one more time than you fall.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

loveojha2 wrote:The error suggests that it is trying to take in a numeric data type column (specified within the datastage), change it to timestamp and see how it works.
Sometimes it gives the same error if timestamp is not inserted in proper format.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kaps
Participant
Posts: 452
Joined: Tue May 10, 2005 12:36 pm

Post by kaps »

Check the NLS date time format of your database and convert it accordingly. Normally it would be yyyy-mm-dd hh24:mi:ss.
No microseconds like DB2.

Thanks
Post Reply