Execute sql 92 query on message queue

245 Views Asked by At

I want to retrieve messages sent in a queue between two PutTime.
I try with this query:

TextMessage vMessage = (TextMessage)  
  super.receiveSelected("Root.MQMD.PutDate = '"+pPutDate+"' 
         AND Root.MQMD.PutTime BETWEEN CAST('103345' AS TIME) AND CAST('104345' AS TIME)");

But I have a message selector syntax exception. What's wrong with this query ?

org.springframework.jms.InvalidSelectorException: JMSWMQ2008: 
Impossible to open the message queue.
It's caused by the the bad syntax of the query
0

There are 0 best solutions below