Subject | Help with select statement |
---|---|
Author | William L. Thomson Jr. |
Post date | 2005-06-27T18:01:52Z |
I am stuck on a db I created. I have two tables that I need to query.
Both are linked via foreign keys to one main table.
Table names are A,B,C with the main one being A.
Now when data is put into table B it can also go into table C as well. I
basically need to get the differences between tables B and C in two
queries. Table B having unique data, and table C having that same data,
and more.
I need one query that returns all records in table B. Then another query
that returns only the records in C, that are not in B.
I know that is totally vague. Hopefully that is a concept that is
possible? If so, a general example query would help out allot. I can
provide more detail within reason. However there are many more tables
than the 3 mentioned, with other linking/foreign keys to other tables. A
bit of a spider web, but should be a normalized db. So I do not want to
get to crazy with detail. Not to mention some specifics I can't mention
at all.
Thanks in advance.
--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.
http://www.obsidian-studios.com
Both are linked via foreign keys to one main table.
Table names are A,B,C with the main one being A.
Now when data is put into table B it can also go into table C as well. I
basically need to get the differences between tables B and C in two
queries. Table B having unique data, and table C having that same data,
and more.
I need one query that returns all records in table B. Then another query
that returns only the records in C, that are not in B.
I know that is totally vague. Hopefully that is a concept that is
possible? If so, a general example query would help out allot. I can
provide more detail within reason. However there are many more tables
than the 3 mentioned, with other linking/foreign keys to other tables. A
bit of a spider web, but should be a normalized db. So I do not want to
get to crazy with detail. Not to mention some specifics I can't mention
at all.
Thanks in advance.
--
Sincerely,
William L. Thomson Jr.
Support Group
Obsidian-Studios, Inc.
http://www.obsidian-studios.com