SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

agastyamahi
Starting Member

Canada
32 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
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

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

visakh16
Very Important crosS Applying yaK Herder

India
52317 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
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

agastyamahi
Starting Member

Canada
32 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  
 New 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.12 seconds. Powered By: Snitz Forums 2000