dbTalk Databases Forums  

RE: Newbie Question - Multiple Tables

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss RE: Newbie Question - Multiple Tables in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Brian Altmann
 
Posts: n/a

Default RE: Newbie Question - Multiple Tables - 08-17-2004 , 08:15 AM






In MDX, the FROM clause can only reference one cube.
You can create a virtual cube from several source cubes and query the
virtual cube.
For this to work smoothly you need to use common dimensions in the source
cubes.
If you have a dimensional table/s as the source of your Time Dimension,
different field names in the Fact Tables should not be a problem.
From your explanation it looks like you are building your Time dimension
directly from the Fact Table fields.
If that's the case you can check out Tom Chester's article on buliding Time
Dimensions at www.tomchester.net, explaining why that is a definite no-no.
HTH,
Brian
www.geocities.com/brianaltmann/olap.html


"Shelley" wrote:

Quote:
I'm new to AS. I am using AS with RS. I have 2 cubes that I need to get
data from. How do I write my query to use 2 cubes. I have tried, FROM
cube1>, <cube2> but it gives a syntax error.

Here is a query against my session cube:

="SELECT Descendants([ClickCost].[All ClickCost], [ClickCost].[keyword],
LEAVES) on AXIS(1),
{ [Measures].[Sessessionid], [Measures].[Sesad Cost] } ON AXIS(0),
{ [Time].[" & Parameters!Year.Value & "].[" & Parameters!Month.Value & "].["
& Parameters!Day.Value & "] } on AXIS(2),
{ [Site].[" & Parameters!Site.Value & "] } on AXIS(3)
FROM Session"

Here is my query for my click cube:

="SELECT Descendants([ClickCost].[All ClickCost], [ClickCost].[keyword],
LEAVES) on AXIS(1),
{ [Measures].[Clkid] } ON AXIS(0),
{ [TimeClick].[" & Parameters!Year.Value & "].[" & Parameters!Month.Value &
"].[" & Parameters!Day.Value & "] } on AXIS(2),
{ [Site].[" & Parameters!Site.Value & "] } on AXIS(3)
FROM Click"

I need to get both results. If I could merge it into one cube, that would
be great, but they use 2 different tables. The only reason the Time
dimension is different is because it complained that the field name was not
the same in both tables. In my session table the field is called sestime,
and in my click table the field is called clktime.

Any help on merging these queries would be really appreciated.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.