I'm working in Crystal 9 on a database I'm not too familiar with. The primary key seems to be a combination of multiple fields. Hence I have records that are almost identical with only slighth variation in a field or two. Or maybe there is no primary key.
Anyway, I'm not sure how to explain my problem, so I'll illustrate it.
sample data:
ID TAG
123 red
123 blue
132 red
122 blue
I want to select all ID's that have "red" and only "red" TAG
In this case, I want only ID 132.
When I do a simple select to give me all records where the TAG is "red", it gives me 123 and 132. Which I can sort of understand. However, my issue here is, since there is another record with ID 123 with a "blue" TAG, I don't want to select it. How do I go about doing this?
Hope that makes sense
Thanks in advance
ibe
Anyway, I'm not sure how to explain my problem, so I'll illustrate it.
sample data:
ID TAG
123 red
123 blue
132 red
122 blue
I want to select all ID's that have "red" and only "red" TAG
In this case, I want only ID 132.
When I do a simple select to give me all records where the TAG is "red", it gives me 123 and 132. Which I can sort of understand. However, my issue here is, since there is another record with ID 123 with a "blue" TAG, I don't want to select it. How do I go about doing this?
Hope that makes sense
Thanks in advance
ibe