on 01-11-2007 9:09 PM
I am writing a report against a custom product that has an unknown amount of characteristics to it. The characteristics describe the attributes and parts required to construct the product.
For example: product is a car. The characteristics can include color, model, weight, year, lighting, tires, etc.
In the report, I will need to allow the user to select any number of characteristics and assign values. They could do the following:
Characteristics:
weight
length
price
tires
Then they could enter in the Characteristic values they want the report to run against.
Characteristic values:
2000
15
24500
Firestone
What this means is this:
weight = 2000
length = 15
price = 24500
tires = Firestone
I **never** know what characteristics they will enter, and I have to trust they enter the values in the proper order to match the characteristics they entered.
My problem is now the query will run like this
Select * FROM Cube
Where (Characteristic = weight OR length OR price OR tires)
AND (Characteristic value = 2000 OR 15 OR 24500 OR Firestone)
What I'd like the query to do is this
Select * FROM Cube
Where (weight = 2000) OR (length = 15) OR (price = 24500) OR (tires Firestone)
That's just pseudo code, don't delve to much in to the SQL statements. It's just an example of what I'm trying to do.
Does anyone have a suggestion?
I am writing a report against a custom product that has an unknown amount of characteristics to it.
what do you mean by unknown chars? and when you say char, do you mean attributes of the char.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, sorry. I have an unknown amount of attributes. When creating the product, a designer can pick the attributes required to make the product and assign values to them.
When creating the report, a manager may select a combination of attributes and values to get a list of what products were designed with them.
For example, he may want a list of all products where they used Firestone Tires, or used Skyblue Paint or have a 15hp fan motor. I never know which attributes he will be looking at or the values of those attributes. He will enter it.
What we've done isn't pretty, and I'm hoping for a better solution.
We've developed 3 ODSs that we've exported a full list of all attributes and their values to. Each ODS is identical.
We've then created an InfoSet to link the Product Cube to each of the 3 ODSs. We can then add 3 variables to the query representing each ODSs. Since the ODS holds over half a million attributes, we limited it to 3 since it takes 30 minutes to run.
It's not elegant, it's not pretty, and I'm sure it's not optimal. I'm hoping someone can describe a better solution.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.