July 27, 2004 at 10:52 am
Hi!
A table has two columns named account_type & customer_type, both can have these possible values: 1, 0 & NULL. I need to create a dimension with two levels. The first one is the name of the column and the second is their values. How can I do this?
Thanks.
July 30, 2004 at 8:00 am
This was removed by the editor as SPAM
July 31, 2004 at 1:34 pm
That doesn't make much sense.
Which of the 2 columns that you have listed is going to be the source for your dimension?
Regards
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
July 31, 2004 at 2:46 pm
<quote>That doesn't make much sense.
Which of the 2 columns that you have listed is going to be the source for your dimension?</quote>
- Both... This is just an attept to make one dimension out of two, that are never analized one to another. So a user should have the name of the column on the top level of hierarchy and the values on the bottom level.
July 31, 2004 at 2:47 pm
<quote>That doesn't make much sense.
Which of the 2 columns that you have listed is going to be the source for your dimension?</quote>
- Both... This is just an attept to make one dimension out of two, that are never analized one to another. So a user should have the name of the column on the top level of hierarchy and the values on the bottom level.
July 31, 2004 at 3:09 pm
I think I understand your requirement. A dimension level can only be based on 1 field hence you'll need to build a view and use that as the source for your dimension.
Try this:
CREATE VIEW MyView
AS
SELECT
'account_type' AS Level1
, account_type AS Level2
from <table_name>
UNION ALL
SELECT
'customer_type' AS Level1
, customer_type AS Level2
from <table_name>
Hope that helps
Regards
Jamie Thomson
http://sqlblog.com/blogs/jamie_thomson
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply