
September 21st, 2000, 08:19 AM
|
|
Junior Member
|
|
Join Date: Aug 2000
Location: Copenhagen, Denmark
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Hi, I'm having two tables a person and a profile table. The profile consist of categories, and each person can be in one or more categories. And now I want to be able to find persons based on their profile.
If I searc on one category in the profile table it works fine, but not if I want to search on multiple categories.
select Name from A, B where B.cat1 = 'y' and A.id = B.id
That work fine, but this selects all persons in the database
select Name from A, B where B.cat1 = 'y'OR B.cat2 = 'y' and A.id = B.id
I really can't get my head around this, any help is appreciated.
Erik
|