G
Guest
I'm helping someone with a parts database. One table has the part number and
a generic description such as spring, bolt, etc. A second table has a list
of attributes for that part. For example, a single bolt might have 3
attributes [attribute]...one for size, one for length, one for type. Each
attribute also has a corresponding value [value]. Each part can have
multiple related attribute/value records.
The problem is in trying to query for multiple criteria. For example, I
need to seach for any bolt that is:
[attribute]=length and [value]=3
AND
[attribute]=size and [value]=small
It's possible that some parts may have up to 10 different attributes/value
combinations.
How can this be done? I know I could query from a query, but the number of
attributes will change often.
Thanks in advance.....
a generic description such as spring, bolt, etc. A second table has a list
of attributes for that part. For example, a single bolt might have 3
attributes [attribute]...one for size, one for length, one for type. Each
attribute also has a corresponding value [value]. Each part can have
multiple related attribute/value records.
The problem is in trying to query for multiple criteria. For example, I
need to seach for any bolt that is:
[attribute]=length and [value]=3
AND
[attribute]=size and [value]=small
It's possible that some parts may have up to 10 different attributes/value
combinations.
How can this be done? I know I could query from a query, but the number of
attributes will change often.
Thanks in advance.....