Posted: Fri Feb 08, 2008 11:41 am Post subject: Retrieve records frm table based on date fields
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;
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
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.
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