ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » datetime insert into Oracle

Post new topic  Reply to topic
 datetime insert into Oracle « View previous topic :: View next topic » 
Author Message
contactop
PostPosted: Mon Aug 30, 2004 2:17 pm    Post subject: datetime insert into Oracle Reply with quote

Acolyte

Joined: 26 Jun 2003
Posts: 50

I am inserting date into oracle inclusive of time through ESQL, i have written the insert stmt as -

T1- table name
c1 - column 1 datatype Varchar2(4)
c2 - column 2 of datatype Date
Insert into t1 (c1,c2) values ('A1','20-Aug-2004 11:23:21') in the compute node.

But this gives an error, as i haven't used the To_date function, and esql doesnot accept the to_date function of oracle.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Aug 30, 2004 2:52 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

You might want to CAST your CHARACTER string AS a TIMESTAMP.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
paustin_ours
PostPosted: Mon Aug 30, 2004 3:39 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

Try this,

PASSTHRU('INSERT into T1(c1,c2) VALUES (?,to_date(?,''format''))',
A1,corresponding format value);

DO NOT FORGET TWO SINGLE QUOTES for the format, This worked for me, just make sure you give the correct format whatever be it and the value following it. Format can be anything MMDDYYYY HH:mm:ss anything...the to_date converts it to the Oracle format.
Back to top
View user's profile Send private message Yahoo Messenger
contactop
PostPosted: Tue Aug 31, 2004 5:57 am    Post subject: Thanks Reply with quote

Acolyte

Joined: 26 Jun 2003
Posts: 50

Chaning it to TIMESTAMP worked.

does PASSTHRU effect performance?
Back to top
View user's profile Send private message
kirani
PostPosted: Tue Aug 31, 2004 10:34 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

I guess the performance overhead is minimum.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » datetime insert into Oracle
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.