filter results
Posted: 13.05.2010, 04:20
I have three tables.
keywordlist
-keyword
requiredkeyword
-keyword
negativekeyword
-keyword
I need to filter the data in the keywordlist not to show words that are in the negativekeyword table, and only show words that show in the requiredkeyword table. If either table is empty then don't worry about that table's constraints.
Here's what I've got so far:
SELECT keyword from Keywordlist LEFT OUTER JOIN NegativeKeyword ON Keywords.keyword=NegativeKeyword.keyword
WHERE NegativeKeyword.keyword IS NULL
UNION SELECT keyword FROM RequiredKeyword
1. Is the above SQL correct for this?
2. How would I go about doing this? I thought that Zeos could do SQL statements in filters, but did not like the "."'s...
Thanks for any help. (I'm new to all this)
-Brad
keywordlist
-keyword
requiredkeyword
-keyword
negativekeyword
-keyword
I need to filter the data in the keywordlist not to show words that are in the negativekeyword table, and only show words that show in the requiredkeyword table. If either table is empty then don't worry about that table's constraints.
Here's what I've got so far:
SELECT keyword from Keywordlist LEFT OUTER JOIN NegativeKeyword ON Keywords.keyword=NegativeKeyword.keyword
WHERE NegativeKeyword.keyword IS NULL
UNION SELECT keyword FROM RequiredKeyword
1. Is the above SQL correct for this?
2. How would I go about doing this? I thought that Zeos could do SQL statements in filters, but did not like the "."'s...
Thanks for any help. (I'm new to all this)
-Brad