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 » MIN and MAX functions are returning incorrect values

Post new topic  Reply to topic
 MIN and MAX functions are returning incorrect values « View previous topic :: View next topic » 
Author Message
kirani
PostPosted: Thu Feb 07, 2002 9:25 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
mpuetz
PostPosted: Fri Feb 08, 2002 2:43 am    Post subject: Reply with quote

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
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 » MIN and MAX functions are returning incorrect values
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.