I need some type of statement that will check my query results for a number in a field and then remove any instance of this item from my query. Example: I have multiple books in a table and I have an identifier field (1 = English, 2 = History, 3 = Science, etc...) where it can cause one book to have multiple options. So this example book (3456) is listed twice because it includes Science and History. I would like a statement that checks for any books that are listed under History to be removed altogether, including the Science line. Any help would be much appreciated.
Software/Hardware used:
ASKED:
July 4, 2011 8:57 PM
UPDATED:
July 5, 2011 1:25 PM
Can you post the SQL code of your current query ?
You are probably going to need to add a condition similar to this one:
…AND <book_id> NOT IN (SELECT <book_id> FROM your_Table WHERE <category> = 2)
It would be helpful to know your tables design as well.