query problem

G

Guest

Hi everybody,

i have two tables (Table1 and Table2) with mostlu similar information. in
order to see what is not matchin in them i created the following tables:

1) InCommon (shows matching info)
2) InTable1_butNotIn_Table2
3) InTable2_butNotIn_Table1

then i combined them (UNION ALL). It is failing to show some info which is
actually existing in one of the tables. the tables contain columns like:
"ID", "NAME" "DAYS", "HOURS", "JOBCLASSIFICATION". In select queries I
related "ID", "DAYS" and ""JOBCLASSIFICATION", as i wanted it to show exact
daily work hours foreach days of each person. The union query is showing me
not complete days of a few personnel's work days. Please help. Thanks in
advances.
 
G

Guest

It is hard to know without knowing more about the tables and your joins.
What is "DAYS" meant to represent, and is it a fixed value for an individual,
or might a person have several entries with different "DAYS" values? How did
you set up your Tablex_butNotIn_Tabley queries? Are all your join fields
ALWAYS populated with data, or could they be Null? Or are you trying to use
any expressions based on fields that might be Null? Null values can often
cause "missing" data problems.

To try to narrow it down, which table should the missing data be in
(InCommon, or Table1_butNotIn_Table2, or Table2_butNotIn_Table1)? Check the
original tables and see where it should be, and then check that query. See
if any Null values are involved, and check your joins carefully.

To get more help, I'm afraid we will need more details - the important part
will be the joins, where the values in the join fields come from, and any
selection criteria or expressions you are using to create your 3 tables...
 
G

Guest

"DAYS" has several entries for different days for one person.

"InTable1_butNotIn_Table2" represents entries that are in "Table1" but not
in "Table2". In this query as a lat column i put "Table1.ID" (Is Null).

"InTable2_butNotIn_Table2" represents entries that are in "Table2" but not
in "Table1". In this query as a lat column i put "Table2.ID" (Is Null).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top