|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
MIN and MAX functions are returning incorrect values |
« View previous topic :: View next topic » |
Author |
Message
|
kirani |
Posted: Thu Feb 07, 2002 9:25 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Hi,
Has anyone tried to use MIN and MAX functions on a LIST? I am retrieving SEQ_NO (Identity column values) from MS SQL server database table and storing them in a list using following ESQL,
SET OutputRoot.XML.FU.SeqList[] = (SELECT tbl.SEQ_NO FROM Database.tbl_some_data as tbl
where
tbl.F1 = InputDestinationList.F1 AND
tbl.F2 = InputDestinationList.F2 AND
tbl.SEQ_NO IN BETWEEN 1 AND 50 );
At this point My list is created with 50 SEQ_NO in it. Later I want to store min, max SEQ_NO and cardinality of list into some variables.
SET OutputRoot.XML.FU.MinSeqNo = (SELECT MIN(LST.SEQ_NO) FROM OutputRoot.XML.FU.SeqList[] AS LST);
SET OutputRoot.XML.FU.MaxSeqNo = (SELECT MAX(LST.SEQ_NO) FROM OutputRoot.XML.FU.SeqList[] AS LST);
SET OutputRoot.XML.FU.TotalSeqNos = CARDINALITY(OutputRoot.XML.FU.SeqList[]);
I am getting wrong values for MinSeqNo and MaxSeqNo (1 and where as the CARDINALITY function is working correctly. Any idea what is going wrong here? For some of the input messages MIN and MAX works correctly.
Am I missing something?
I am thinking of an alternative approach to get MIN and MAX values from the Database instead of getting it from the list.
Kiran
|
|
Back to top |
|
 |
mpuetz |
Posted: Fri Feb 08, 2002 2:43 am Post subject: |
|
|
Centurion
Joined: 05 Jul 2001 Posts: 149 Location: IBM/Central WebSphere Services
|
Hi,
looks like a real bug, this should work.
Check the APARs on the IBM software support
page, whether this is a known bug for your
version.
_________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|