I've been banging my head against a wall over this problem for several days now.
I have three tables: holdings, letters and correspondents
I'm trying to extract data from all three to match a string entered by a user.
My query looks up an id from one table and matches it to a result in the others.
This query works:
select holdings.holder, letters.dates, letters.rec_id, correspondents.corr_id, letters.number_of_letters, correspondents.correspondent from correspondents, letters, holdings where correspondents.correspondent like '%[user entered string]%' and correspondents.corr_id=letters.corr_id and holdings.holder_id=letters.address
I would like to extract results where correspondents.corr_id = letters.corr_id OR letters.rec_id
Any ideas on how I can do this?
I have three tables: holdings, letters and correspondents
I'm trying to extract data from all three to match a string entered by a user.
My query looks up an id from one table and matches it to a result in the others.
This query works:
select holdings.holder, letters.dates, letters.rec_id, correspondents.corr_id, letters.number_of_letters, correspondents.correspondent from correspondents, letters, holdings where correspondents.correspondent like '%[user entered string]%' and correspondents.corr_id=letters.corr_id and holdings.holder_id=letters.address
I would like to extract results where correspondents.corr_id = letters.corr_id OR letters.rec_id
Any ideas on how I can do this?