hello, I have a query that works correctly, but I need the result to be inversed: SELECT DISTINCT states.stid, states.name AS state_name FROM states, new_contact WHERE states.stid = new_contact.state
states.* contains all of the states. right now, this generates a list of states that are already in new_contact.state. I need the list to be of states not in new_contact.state.
Can anyone help?
Thanks!
LifeinAsia
3:31 pm on Jul 16, 2009 (gmt 0)
Try: SELECT DISTINCT states.stid, states.name AS state_name FROM states LEFT OUTER JOIN new_contact ON states.stid = new_contact.state WHERE new_contact.state IS NULL