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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Named TSQL Query in SSAS
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

33 Posts

Posted - 02/17/2014 :  21:18:33  Show Profile  Reply with Quote
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
ANA001 6

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


Slow But Sure Yak Herding Master

United Kingdom
3608 Posts

Posted - 02/18/2014 :  10:26:35  Show Profile  Reply with Quote
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

Very Important crosS Applying yaK Herder

52326 Posts

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

SQL Server MVP
Go to Top of Page

Starting Member

33 Posts

Posted - 02/18/2014 :  21:56:16  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000