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 » other ESQL function instead of CARDINALITY

Post new topic  Reply to topic
 other ESQL function instead of CARDINALITY « View previous topic :: View next topic » 
Author Message
swarna.prava.mohanty
PostPosted: Sun Aug 29, 2010 9:06 pm    Post subject: other ESQL function instead of CARDINALITY Reply with quote

Novice

Joined: 29 Aug 2010
Posts: 15

CARDINALITY function returns the number of elements in a list.

DECLARE CountF1F12 INT CARDINALITY(SELECT F.* FROM OutputRoot.XMLNS.Data.Source.F1[] AS F where F = 'F12');

What are the other ESQL function to do the above.I dont want to use loop statement.Is there any ESQL function to get the number of elements in a list.
Back to top
View user's profile Send private message
SANTYP
PostPosted: Sun Aug 29, 2010 9:49 pm    Post subject: Reply with quote

Centurion

Joined: 27 Mar 2007
Posts: 142

CARDINALITY is only funtion you can find the number elements in a list.

or you can write loop(either while or for to count the number of F1 elements)
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 30, 2010 4:17 am    Post subject: Re: other ESQL function instead of CARDINALITY Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

swarna.prava.mohanty wrote:
I dont want to use loop statement.


Why don't you want to use a loop? Typically it's much more efficient than CARDINALITY.

There are very few requirements where the number of elements in a list is a piece of data with any business value. Which of course is not to say yours isn't one of the few.
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » other ESQL function instead of CARDINALITY
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.