I have 3 tables: KeyWords, GrantsKeyConn, Grants. The way it is set up, each "grant" has associated "keywords", which are stored in the KeyWords table as such:
Each "keyword" is associated/connected to a specific "grant" in the GrnatsKeyConn table as such:
... so that multiple "keywords" can be associated/connected to one "grant". Finally, each "grant" is stored in the Grants table as such:
I'm trying to filter out grants by specifying keywords in a textbox. So, say I specify the keywords "test, new, final"... then the result would filter out only grants that have those keywords associated with them; it doesn't have to result in grants that only have the 3 keywords associated with them; it can result in grants that have 1, 2, 3, ..., all of the keywords specified. In addition, if a grant has more than 1 keyword associated with it, I don't want it to show more than once in the results.
So how would I make this query? I don't want to do a select from KeyWords table to get ID of a keyword, then use that ID to go into the GrantsKeyConn table to get the associated grants, then go to the Grants table to extract the right grants. If so, how would I do this?
Let me know if I need to further clarify my question.