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 » Selecting TIMESTAMP Column from Oracle

Post new topic  Reply to topic
 Selecting TIMESTAMP Column from Oracle « View previous topic :: View next topic » 
Author Message
mquser1
PostPosted: Tue Feb 01, 2005 5:31 pm    Post subject: Selecting TIMESTAMP Column from Oracle Reply with quote

Novice

Joined: 03 Jun 2004
Posts: 23

Hi all,

We have a requirement where we are supposed to insert each message, along with the current timestamp into an Oracle table. Our first message flow essentially does the insertion. We have a second message flow that is supposed to select all the messages that are younger than a particular timestamp, for further processing.

All this was working fine if we used a db2 table.

Msgflow1 does:
=============================
INSERT INTO Database.table1(orderNum, insertTime, rec010, rec050) VALUES
-- (OutputRef.DefaultToSTONumber, current_timestamp, Record10, Record50);
=============================

and Msgflow2 does
=============================
SET Environment.Variables.TMP.OrderNumArray[] = PASSTHRU('SELECT DISTINCT ordernum FROM table1 WHERE inserttime < ?', ctime);
=============================

However this does not work if we create the same table in Oracle.

Essentially it looks like Oracle timestamp object is different from that of the Broker. I started trying several things like converting the broker timestamp to orracle timestamp using the to_date function in oracle. With this I was able to do the insertion ok. However it bombs out when i try to select the rows from the table. It appears like Broker is unable to understand the oracle timestamp column. I keep getting an exception that says:

----------------------------------
Database exception: Expected %s got %s
-----------------------------------

Has anyone run into this situation before? Any ideas on how to proceed further on this?

Thank you very much and warm regards.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Wed Feb 02, 2005 4:42 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

There's probably a more descriptive error message in your Oracle logs.

You might need to manually construct a string that has an Oracle friendly date / timestamp from the timestamp.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
mquser1
PostPosted: Wed Feb 02, 2005 9:24 am    Post subject: Reply with quote

Novice

Joined: 03 Jun 2004
Posts: 23

We did construct an oracle friendly string using its to_date function and thus were able to insert okay. However the problem comes when we try to select that timestamp column in the second flow. I keep getting the error that says

------------
DatabaseException: Expected %s got %s
------------

My feeling is that the broker is unable to understand oracle's timestamp object. How do I read the date from Oracle in a way that is broker friendly.
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Feb 04, 2005 12:17 am    Post subject: Reply with quote

Jedi Knight

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

Can you post your complete ExceptionList
Also, one of the ESQL manual explains datatype mapping between ESQL and Databases.
_________________
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
chenulu
PostPosted: Fri Feb 04, 2005 10:34 am    Post subject: Reply with quote

Voyager

Joined: 27 Mar 2002
Posts: 87
Location: Research Triangle Park, NC

Please post your WBI-MB/WMQI version / CSD level and Oracle versions. Also, can you please run the same from SQLPlus and see if you get the desired result. The reason I ask this is because with a PASSTHRU statement, the entire work is performed by the Database.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Selecting TIMESTAMP Column from 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.