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
 General SQL Server Forums
 New to SQL Server Programming
 Named TSQL Query in SSAS

Author  Topic 

agastyamahi
Starting Member

33 Posts

Posted - 2014-02-17 : 21:18:33
I want to write a named query in the cube solution to define a hierarchy relationship between the VendorID and CompanyID.

Eg Data

VendorID CompanyID
660IN001 4
69DES001 4
705AS001 4
2AD01 1
2KM01 1
2MZ01 1
12601 2
19Z01 2
4AR01 2
AMEJUH001 6
ANA001 6
ANACROPLZ 6

Can any one please tell me how to write a query to achieve the hierarchy relationship?

Thanks

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2014-02-18 : 10:26:35
Not without a lot more information about your actual tables. I can tell you that you will need a SELECT and a JOIN, but not much else from what you have given us here.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-02-18 : 11:55:20
I dont anything which calls for hierarchy relationship here. How do you want hierarchy to appear in cube?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

agastyamahi
Starting Member

33 Posts

Posted - 2014-02-18 : 21:56:16
Sorry about the confusion, I didn't use any query for this. In SSAS cube solution itself, I dragged the companyid and vendorId into the hierarchy pane and it formed a hierarchy for me. I am good now, Sorry again.
Go to Top of Page
   

- Advertisement -