Last post Oct 27, 2011 10:31 AM by Orsolya Ga - MSFT
Sep 29, 2011 08:52 PM|hkbeer|LINK
I am new to MDX...
I already have a working sqldatasource and there is a selectcommand within the control. It is working fine.
The data source file is an OLAP cube I created elsewhere and copied to this web server (so maybe this is called offline/local cube file?) and thus I am wondering where I can put my MDX statement. Can I just write that MDX query in selectcommand WITHIN the sqldatasource
Pls help, thanks
Oct 01, 2011 08:34 PM|Decker Dong - MSFT|LINK
Can I just write that MDX query in selectcommand WITHIN the sqldatasource control ? What is the easier way of doing MDX and where is the best place to put it into work ?
A better way on my point is that you can first write a stored procedure with MDX statements, and then refer to this stored procedure with the help of your statement.
Oct 03, 2011 01:44 AM|hkbeer|LINK
Thanks, but I still wish to explore if we can successfully write MDX in selectcommand property of the sqldatasource control... anyone can help to try ?
Oct 10, 2011 12:28 PM|Orsolya Ga - MSFT|LINK
In TSQL you can access SSAS data through linked server and OPENQUERY
You have to setup a linked server to SSAS.
Then you can run OPENQUERY with the MDX like this:
SELECT * FROM OPENQUERY (SSASLinkedServer, ‘MDX Query text’)
Microsoft Online Community Support
Oct 10, 2011 09:13 PM|hkbeer|LINK
Thanks a lot. Actually I do not have full SQL server. I just have SQL express + Ms Access.
So I want to explore if I have a sqldatasource control (Drag and drop from toolbox) that is already succesfully connected to a cub file and successfully run SQL command by writing SQL in Selectcommand property and the related Gridview can display desired
I just now want to take a bit step further: in the Selectcommand property of sqldatasource control on the page can we write MDX and that's all I wish to know.
Can I say the answer is NO ?
Thanks to all.
Oct 19, 2011 04:53 AM|Orsolya Ga - MSFT|LINK
You can create linked server also in SQL Express. But Analysis Services is not available with SQL Express.
I am not exactly sure what you mean with cube file, but if it is a local cube than you can use it with linked server connection too (with the limitation of local cubes).
Local Cubes (Analysis Services - Multidimensional Data)
Microsoft Online Community Support
Oct 20, 2011 09:38 PM|hkbeer|LINK
Actually I do not have SQL Server on the web server and the cub file is a standalone cub file that I created on another machine and copied to here. But I can use standard SQL command to query it with good result within the sqldatasource control on aspx page.
In this environment, how can I write MDX on this query ?
If SQL server is a must, after I installed SQL Server Express, how to sets up
linked server connection ? I do not know how to do it... any documentation ?
Oct 27, 2011 10:31 AM|Orsolya Ga - MSFT|LINK
Normally I would suggest to write the MDX query first in Management Studio MDX query editor and then copy the finished query to the OPENQUERY. But in the described environment you don’t seem to have many tools available. Couldn’t you write the query on the
server where you created the cub file? Management Studio should be available there.
How to write MDX is a big topic, you will find several books about it. Here a couple of links for starting on MDX:
MDX Query Fundamentals (MDX)
The Basic MDX Query (MDX)
You can find the description how to create linked server in Management Studio or TSQL here:
Creating Linked Servers (SQL Server Database Engine)