Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 noobie tsql question about olap

Author  Topic 

gdeconto
Posting Yak Master

107 Posts

Posted - 2002-08-23 : 18:16:38
this is probably a stupid question, but its late (for me) on a friday and my eyes are so blurry I can't tell if this is the sqlteam site or a game site ...

1. We have some very large datasets (many millions of records) that I would like to summarize using olap

2. I would like to display some/all of those summaries on an intranet using an ASP webpage and stored procedures

3. I just started learning about olap about an hour ago (going thru the mssql 2k olap tutorials quickly)

I am assuming, having looked thru the sql helps, that it may be possible to get at the contents of the cube using normal transact sql statements (ie select from...)

but I can't figure out how.

all I'm asking for is a super simple sample select statement (woo hoo - aliteration - not bad considering I'm almost comatose) that gets some info from the sample cubes that you create using the olap tutorial.

any help appreciated by this tired wretch of a developer.


ksw
Starting Member

24 Posts

Posted - 2002-08-23 : 18:29:49
You can only use T-SQL statements on the source tables of the cube. If you want to query the actual cube, you have to use MDX. MDX stands for Mulit-Dimensional Expressions. There is some stuff in BOL, just look up MDX in the index. The syntax is way different than SQL so get ready to learn something new and probably get confused along the way.

--KSW

Go to Top of Page

gdeconto
Posting Yak Master

107 Posts

Posted - 2002-08-23 : 18:32:21
the mdx looks a little cryptic but after algol, fortran, cobol, pascal, c, c++, java, basic, dbase, acl, etc you get used to learning yet another *&^(*)(&*)( syntax.

I'm still not sure on how I would query the cube (using mdx or whatever) from query analyser or my asp code. Any hints?

Go to Top of Page

ksw
Starting Member

24 Posts

Posted - 2002-08-23 : 18:46:17
If you installed all of the samples that came with the install, look for a program called mdxsampl.exe. Mine was in OLAP Service\bin. It's a sample program that uses an ActiveX control (I think), and lets you write MDX queries. I didn't play with it enough to figure out where the .dll are or how to add them to your own app or if you even can. I found out about the app from the book "Data Warehousing with Microsoft SQL Server 7.0 Technical Reference" by Jake Sturm. It's a MS Press book. The book goes through some examples using the sample app with screen prints and everything. I don't know if they have an SQL Server 2000 version.

I know it's not much, but maybe this will give you a place to start.

And I don't think that you can use MDX in QA.
--KSW

Go to Top of Page

gdeconto
Posting Yak Master

107 Posts

Posted - 2002-08-23 : 18:59:09
thx for the info.

have figured out so far that I need to create a linked server entry to be able to access the info.

maybe a good time for a quick snooze.

Go to Top of Page

jasper_smith
SQL Server MVP & SQLTeam MVY

846 Posts

Posted - 2002-08-23 : 19:39:25
You can use ADO MD to query your cubes from ASP using MDX using the msolap provider.Examples can be found in (default install) C:\Program Files\Microsoft Analysis Services\Samples , specifcally AspAdoSimple,AspAdoCubeTree,AspAdoCubeDoc,AspAdoComplex



HTH
Jasper Smith
Go to Top of Page

gdeconto
Posting Yak Master

107 Posts

Posted - 2002-08-26 : 17:41:50
for cryin out loud - what a nightmare.

after countless attempts at creating a linked server to the olap info (so I could look into querying the contents), and many hours of effort, had to uninstall the olap services, reinstall them, apply sql2k sp2 and then win2k sp3 onto the sql2k server.

I then had to do exactly the same thing to the client workstation I was using to work on the sql2k server.

argggggggggggg!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I am now able to connect to the test olap db FoodMart 2000.

I was able to do some very basic queries from the samples provided by MS (per Jaspers suggestion)

There is still some bizarre stuff happening but at least I was able to get that far.

thx to all for your help.


Go to Top of Page
   

- Advertisement -