Thanks in advance for any assistance that can be provided...
I have two tables that I would like to join in a query.
Table #1
Attributes ATT
.AttributeID
.AttributeName
Table #2
CategoryAttributes CA
.CategoryAttributeID (the index)
.AttributeID
.CategoryID
There are about 20 records in the Attributes table, and I am trying to get a query that will return all 20 Attributes records, with another column that would have any value only if the Attributes.AttributeID is found in the CategeoryAttributes.AttributeID if CategoryAttributes.CategoryID=71, where 71 is just a particular CategoryID. If an AttributeID is not found in the CA table where CA.CategoryID=71, then I want a null value or the like to be returned.
For examples sake, the CA table has 5 records where CategoryID=71. So far, every query I try results in a returned set of just the 5 attributes found in the ATT table. What I really want is something returned like this:
ATT.AttributeID | ATT.AttributeLabel | CA.[any one field]
------------------------------------------------------
1 Par [null]
2 Slope [a value]
3 Holes [null]
etc.
In this example, the CA table would have the CategoryID of 71 with an AttributeID of 2, and CA would have no listing for a CategoryID of 71 with an AttributeID of 1.
Any ideas? Thanks!
I have two tables that I would like to join in a query.
Table #1
Attributes ATT
.AttributeID
.AttributeName
Table #2
CategoryAttributes CA
.CategoryAttributeID (the index)
.AttributeID
.CategoryID
There are about 20 records in the Attributes table, and I am trying to get a query that will return all 20 Attributes records, with another column that would have any value only if the Attributes.AttributeID is found in the CategeoryAttributes.AttributeID if CategoryAttributes.CategoryID=71, where 71 is just a particular CategoryID. If an AttributeID is not found in the CA table where CA.CategoryID=71, then I want a null value or the like to be returned.
For examples sake, the CA table has 5 records where CategoryID=71. So far, every query I try results in a returned set of just the 5 attributes found in the ATT table. What I really want is something returned like this:
ATT.AttributeID | ATT.AttributeLabel | CA.[any one field]
------------------------------------------------------
1 Par [null]
2 Slope [a value]
3 Holes [null]
etc.
In this example, the CA table would have the CategoryID of 71 with an AttributeID of 2, and CA would have no listing for a CategoryID of 71 with an AttributeID of 1.
Any ideas? Thanks!