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 IndexWebSphere Message Broker (ACE) SupportRetrieve records frm table based on date fields

Post new topicReply to topic
Retrieve records frm table based on date fields View previous topic :: View next topic
Author Message
MBLearner
PostPosted: Fri Feb 08, 2008 11:41 am Post subject: Retrieve records frm table based on date fields Reply with quote

Novice

Joined: 20 Jan 2006
Posts: 23

Hi,

I would like to retireve records from the table from Oracle 9i database where the datetime value of a column (say TRANS_DATETIME) is less than the CURRENT_TIMESTAMP. TRANS_DATETIME contains the datetime value already inserted through ESQL CURRENT_TIMESTAMP value. Now I want to retrive some of the records after certain period of time (say 5 min) where the value of the TRANS_DATETIME < CURRENT_TIMESTAMP

But the below code is not working.

SET Environment.Variables.DBRecords = SELECT T. COL1, T.COL2
FROM Database.TABLE1 AS T
WHERE T.TRANS_DATETIME<CURRENT_TIMESTAMP;

Any idea? Thanks in Advance.
Back to top
View user's profile Send private message
VivekMeshram
PostPosted: Sun Feb 10, 2008 4:00 pm Post subject: Reply with quote

Voyager

Joined: 25 Mar 2002
Posts: 83

Try following ESQL
SET Environment.Variables.DBRecords [] = (SELECT T1.TRANSDATE FROM Database." Table Schema.TABLE1” AS T1 WHERE T1.TRANSDATE < CURRENT_TIMESTAMP);
_________________
Thanks
Vivek S Meshram.

·IBM Certified Specialist – IBM WebSphere MQ v5.3 / v5.2
Back to top
View user's profile Send private message Send e-mail
grammer
PostPosted: Mon Feb 11, 2008 6:23 am Post subject: Reply with quote

Novice

Joined: 08 Feb 2008
Posts: 16
Location: Canada

don't want to hijack this topic but, I myself will be doing soem db stuff later and is wondering how would you access that varible in the maping node? I know in the mappoing node you can tell it to slect from the dataabase, but i can't only get one row back, have not been able to fins a wway to get more then one row back.
Back to top
View user's profile Send private message
gregop
PostPosted: Tue Feb 12, 2008 1:09 am Post subject: Reply with quote

Voyager

Joined: 24 Nov 2006
Posts: 81

You'll need to use PASSTHRU.

Quote:
http://www-1.ibm.com/support/docview.wss?rs=849&uid=swg27007450#ESQL


http://www-1.ibm.com/support/docview.wss?rs=849&uid=swg27007450#ESQL
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker (ACE) SupportRetrieve records frm table based on date fields
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.