B
Bob
I need to do an AND query on the same field in a table. For example, in the
simple table that links documents and their associated keywords I might have
doc1 key1
doc1 key2
doc1 key3
doc2 key2
doc2 key3
doc2 key4
doc3 key3
doc3 key1
If I queried on keys key2 AND key3 I want both doc1 and doc2 returned.
Simple? It ought to be but I can not figure out how to do it. A simple
SELECT WHERE key=key2 AND key=key3 will not work for obvious reasons: a key
can not have more than one value.
Do I have to use a subquery? If so how would I code it?
Bob
simple table that links documents and their associated keywords I might have
doc1 key1
doc1 key2
doc1 key3
doc2 key2
doc2 key3
doc2 key4
doc3 key3
doc3 key1
If I queried on keys key2 AND key3 I want both doc1 and doc2 returned.
Simple? It ought to be but I can not figure out how to do it. A simple
SELECT WHERE key=key2 AND key=key3 will not work for obvious reasons: a key
can not have more than one value.
Do I have to use a subquery? If so how would I code it?
Bob