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 » Date Between in esql

Post new topic  Reply to topic
 Date Between in esql « View previous topic :: View next topic » 
Author Message
ravi.cloud2006
PostPosted: Sat Aug 02, 2014 10:31 pm    Post subject: Date Between in esql Reply with quote

Newbie

Joined: 19 Feb 2014
Posts: 6

I was trying to fetch records using following query.

DECLARE FromDate CHARACTER '14-APR-14';
DECLARE ToDate CHARACTER '20-APR-14';

select * from Sample AS SPL WHERE SPL.TRAN_DATE BETWEEN FromDate AND ToDate AND SPL.ACC_NO = '12345';

i did not get any error but not getting expected result also.

If i execute the query in database its working fine.using esql im not able to do.

how to use date between in esql?.

Thanks,
Back to top
View user's profile Send private message
smdavies99
PostPosted: Sun Aug 03, 2014 12:31 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Is 'TRAN_DATE' a character field or is it some other type?
You may have to do some conversions.
If your Database is Oracle, then this is especially true.
There are a number of posts in this forum that discuss problems with dates and databases.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
ravi.cloud2006
PostPosted: Sun Aug 03, 2014 12:54 am    Post subject: Reply with quote

Newbie

Joined: 19 Feb 2014
Posts: 6

Thanks for your reply..

The issue is solved...

I have converted the character to Date format.It is working fine now.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Date Between in esql
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.