Hello!
Here's what I'm trying to do... I've got 2 tables in my database - A & B.
A has multiple columns, one of which = gid.
B has 2 columns = pid_fk, gid_fk.
The gid_fk column in B is a foreign key that relates to the gid column in table A.
What I want to do is select all the records in table A that DON'T have a corresponding record in table B. ie. select all those from A whos gid "does not" appear in B as a gid_fk.
Then I also need code that does the opposite - select all records from A whos gid "does" appear in B as a gid_fk.
I believe it's done with a left join statement but I can't figure out how to use it.
Can anyone help?
Thanks!
Here's what I'm trying to do... I've got 2 tables in my database - A & B.
A has multiple columns, one of which = gid.
B has 2 columns = pid_fk, gid_fk.
The gid_fk column in B is a foreign key that relates to the gid column in table A.
What I want to do is select all the records in table A that DON'T have a corresponding record in table B. ie. select all those from A whos gid "does not" appear in B as a gid_fk.
Then I also need code that does the opposite - select all records from A whos gid "does" appear in B as a gid_fk.
I believe it's done with a left join statement but I can't figure out how to use it.
Can anyone help?
Thanks!