Quantcast
Channel: SQL Server Analysis Services forum
Viewing all articles
Browse latest Browse all 14337

MDX Questions

$
0
0

Hi

These may be very simple questions but I am learning MDX and would really appreciate if someone can help me with them.

1) On SSMS, MDX Query builder, if I have two seperate  mdx queries and I want to run them together, The builder doesnt like it and gives me an error saying the "The syntac for Select is incorrect". I know in SQL we can seperate two select statements by the word "GO" how can I seperate two MDX select queries. I have something like this that it doesnt like

Select {measure.Item } on columns, {Dim.x} on rows from Cube where Items.train.&1

 

Select {measure.Item } on columns, {Dim.x} on rows from Cube where Items.train.&2

Executing them together doesnt work. How can I seperate them and execute them togehter and get the results for both on the same pane.

2) Is there a place like stored procs for writing MDX. We have two servers, one has the processed cube on it and the other has the queries running that access the cube via linked server. Since we are accesing the cube whic is on server 1 from server 2, I have to write openquery link MDX queires from server 2 everytime. I would rather than the MDX like in a proc or something on server 1 and call it from there with respective parameters. Please suggest if there is a better way of doing it rahter than writing MDX in openquery adn accessing data like that.

3) Also how can I write an MDX that picks the min value and its datetime recorded during a day.

Thanks much

-Sarah



Viewing all articles
Browse latest Browse all 14337

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>