dbTalk Databases Forums  

Can I use a single table multiple times in a data source view?

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


Discuss Can I use a single table multiple times in a data source view? in the microsoft.public.sqlserver.olap forum.



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

Default Can I use a single table multiple times in a data source view? - 06-02-2006 , 04:55 AM






We are using SQL Server Business Intelligence Development Studio to create a
cube. We have a TOrders table with 2 foreign keys to TCustomers, one for the
InvoicedCustomerId and other for DeliveredCustomerId. In Analysis Services
2000, we need to use TCustomers two times, aliased to TInvoicedCustomers and
TDeliveredCustomers inside the cube. However, now that we are using SQL
Server 2005 and we need to create a datasource view so that a latter cube
relies on it.

It seems there is no way to drop a single table more than once onto the
datasource view diagram. Is this right? Do we need to use it twice here or
will the work be done if it is used just once? If it should be dropped just
once, I suppose we will need to define (do not delete) the 2 relationships
that are automatically created when both TOrders and TCustomers are dropped
into the diagram. Am I right? Since TCustomers is just used once in the
diagram, when will I need to define those aliases for it (InvoicedCustomer
and DeliveredCustomer)?

I know these are very basic questions but I cant find any example of this
kind around. Thanks a lot.



Reply With Quote
  #2  
Old   
Akshai Mirchandani [MS]
 
Posts: n/a

Default Re: Can I use a single table multiple times in a data source view? - 06-02-2006 , 02:46 PM






Is TCustomers really just the same dimension? In that case, in AS 2005 you
should just create one dimension (Customers pointing to TCustomers) and then
add that dimension twice to the cube -- this defines the dimension to play
two roles, once as InvoicedCustomer and the other as DeliveredCustomer.

When you add the dimension to the cube you can specify the column to be used
as the binding for the granularity attribute (in this case CustomerId). So
for the cube dimension DeliveredCustomer you would use DeliveredCustomerId
in the fact table and for the cube dimension InvoicedCustomer you would use
InvoicedCustomerId.

This way the dimension only needs to be processed once but it can be used
multiple times in the same cube.

In case you really do need to use the same table multiple times in a DSV,
here are some ways:
- create a view of the table
- create a named query (SELECT * FROM table)

HTH,
Akshai

--
--
Try out the MSDN Forums for Analysis Services at:
http://forums.microsoft.com/MSDN/Sho...ID=83&SiteID=1

This posting is provided "AS IS" with no warranties, and confers no rights
Please do not send email directly to this alias. This alias is for newsgroup
purposes only.


"jagb" <jagb (AT) NOSPAM (DOT) com> wrote

Quote:
We are using SQL Server Business Intelligence Development Studio to create
a cube. We have a TOrders table with 2 foreign keys to TCustomers, one for
the InvoicedCustomerId and other for DeliveredCustomerId. In Analysis
Services 2000, we need to use TCustomers two times, aliased to
TInvoicedCustomers and TDeliveredCustomers inside the cube. However, now
that we are using SQL Server 2005 and we need to create a datasource view
so that a latter cube relies on it.

It seems there is no way to drop a single table more than once onto the
datasource view diagram. Is this right? Do we need to use it twice here or
will the work be done if it is used just once? If it should be dropped
just once, I suppose we will need to define (do not delete) the 2
relationships that are automatically created when both TOrders and
TCustomers are dropped into the diagram. Am I right? Since TCustomers is
just used once in the diagram, when will I need to define those aliases
for it (InvoicedCustomer and DeliveredCustomer)?

I know these are very basic questions but I cant find any example of this
kind around. Thanks a lot.





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.