D
djc
tblTest:
ID
Keyword
Sample data:
100, chicken
100, chicken soup
100, soup
101, turkey soup
101, african turkey
102, cooking soup
102, cooking
103, african soup
Is it possible to create a query that can return only the IDs that have user
supplied keywords associated with them?
Example1: users enters 'soup' as a single keyword. My code would take that
and make it *soup* to get all with 'soup' anywhere in it. And it should
return 100, 101, and 102.
Example2: user enters two keywords. 'soup' and 'turkey'. I make them *soup*
and *turkey*. It should return ONLY 101. I want to use a logical AND
condition. The ID must have BOTH keywords associated with it but it they
don't have to be in the same record. For example, this same query should
return only 101 even if 'soup' and 'turkey' were two SEPERATE records, like
this: 101, soup and 101, turkey.
Example3: user enters two keywords. 'africa' and 'soup'. I change to
*africa* and *soup*. Query should return ONLY 103. Not the others with
'soup' and not the other with 'african'. There must be a record with both
keywords in it together, OR 2 seperate records each with one of the
keywords.
anyone know how I could accomplish this? I very good method was posted by
John Viescas but it didn't support wild cards. You can look for the post
subject "Keyword lookup system guidance needed" to see that. I started this
new post because John's help has got me to a more narrowly defined
'question'. So I started fresh.
any help is greatly appreciated.
ID
Keyword
Sample data:
100, chicken
100, chicken soup
100, soup
101, turkey soup
101, african turkey
102, cooking soup
102, cooking
103, african soup
Is it possible to create a query that can return only the IDs that have user
supplied keywords associated with them?
Example1: users enters 'soup' as a single keyword. My code would take that
and make it *soup* to get all with 'soup' anywhere in it. And it should
return 100, 101, and 102.
Example2: user enters two keywords. 'soup' and 'turkey'. I make them *soup*
and *turkey*. It should return ONLY 101. I want to use a logical AND
condition. The ID must have BOTH keywords associated with it but it they
don't have to be in the same record. For example, this same query should
return only 101 even if 'soup' and 'turkey' were two SEPERATE records, like
this: 101, soup and 101, turkey.
Example3: user enters two keywords. 'africa' and 'soup'. I change to
*africa* and *soup*. Query should return ONLY 103. Not the others with
'soup' and not the other with 'african'. There must be a record with both
keywords in it together, OR 2 seperate records each with one of the
keywords.
anyone know how I could accomplish this? I very good method was posted by
John Viescas but it didn't support wild cards. You can look for the post
subject "Keyword lookup system guidance needed" to see that. I started this
new post because John's help has got me to a more narrowly defined
'question'. So I started fresh.
any help is greatly appreciated.