Hysteria862
05-27-2009, 05:54 PM
Hi,
I'm just wondering if this statement is logically possible in SQL. I'm writing this example in semi-pseudo code.
I have two tables:
persons (a group of people, each has an id)
travelling persons (the specific members of the group travelling on a particular journey, again with their id, if they are not travelling they have a field 'deleted' set to 'Y'.
Basically I want to retrieve results where:
persons.id IS NOT EQUAL TO travelling_persons.id (WHOSE DELETED FIELD IS SET TO 'Y')
I'm just wondering if this statement is logically possible in SQL. I'm writing this example in semi-pseudo code.
I have two tables:
persons (a group of people, each has an id)
travelling persons (the specific members of the group travelling on a particular journey, again with their id, if they are not travelling they have a field 'deleted' set to 'Y'.
Basically I want to retrieve results where:
persons.id IS NOT EQUAL TO travelling_persons.id (WHOSE DELETED FIELD IS SET TO 'Y')