Where clause of MDX -
09-02-2003
, 09:59 AM
Hi,
According to my knowlege the WHERE clause of MDX Queries
expects a touple in front of it.
The .item(0) function returns a touple from a set according to
definition. (there is another variation of .item that returns a member
from a tuple).
There ORDER() function returns a set.
My question is when i execute the following query,
SELECT TIME.YEAR.MEMBERS ON COLUMNS FROM SALES
WHERE ORDER(market.region.members, measures.sales).item(0)
it gives the error :-
Unable to open cellset
Syntax error, expecting end of statement
but found extra text, near: '.item(0)'
But when I execute the following , it executes it succesfuly. (I just
added open bracket before ORDER and another close bracket after
..item.
SELECT TIME.YEAR.MEMBERS ON COLUMNS FROM SALES
WHERE (ORDER(market.region.members, measures.sales).item(0))
I know that when I explicitly write a single member on axis, i have
to convert it into set by using { } brackets. This means by default
it assumes it a tuple. Then why didnt it assumed it a tuple in the where
clause.
Thanks
Asim Naveed
--
Posted via http://dbforums.com |