Connecting Tech Pros Worldwide Forums | Help | Site Map

A question about joins

Galka
Guest
 
Posts: n/a
#1: Nov 13 '05
Hello
I have 2 tables, each one has a Course Code field. I need to find
courses, which are not present in one of the tables.
It would have been very simple, but in one table Course Code can be not
1 course code, but several, like: CBEA2B0886,CBEA2B0887. As a result,
if I join tables by course code field, both these courses are not
found, when they are perfectly present.
I know how to do this in code. My question is, is it possible to do
without code, on query level? If yes, how? Thank you.
Galina


Phil Stanton
Guest
 
Posts: n/a
#2: Nov 13 '05

re: A question about joins


Do a query with one table joined to the other with a left join. Display the
2 sets of codes and set the condition that table1 code Is Null
Then do the join the other way and look for Table2 code being Null

Phil
"Galka" <galkas@mail.ru> wrote in message
news:1130157390.211102.86110@g47g2000cwa.googlegro ups.com...[color=blue]
> Hello
> I have 2 tables, each one has a Course Code field. I need to find
> courses, which are not present in one of the tables.
> It would have been very simple, but in one table Course Code can be not
> 1 course code, but several, like: CBEA2B0886,CBEA2B0887. As a result,
> if I join tables by course code field, both these courses are not
> found, when they are perfectly present.
> I know how to do this in code. My question is, is it possible to do
> without code, on query level? If yes, how? Thank you.
> Galina
>[/color]


Larry Linson
Guest
 
Posts: n/a
#3: Nov 13 '05

re: A question about joins


Do you mean you have several course codes in one record?

If so, that would be emulating a "multi-value" field, and
Access doesn't have a good way to query those, so a
little table redesign might be in order

Or do you mean you have records for several course codes in that table?

If so, left click the join line in QueryBuilder to highlight it, then right
click the highlighted line, and set the join properties to select a join
type for all records from one table and those that match from the other.
Depending on your table design, you might have to do that same kind of
operation on a join line going in the other direction, also.

Larry Linson
Microsoft Access MVP



"Galka" <galkas@mail.ru> wrote in message
news:1130157390.211102.86110@g47g2000cwa.googlegro ups.com...[color=blue]
> Hello
> I have 2 tables, each one has a Course Code field. I need to find
> courses, which are not present in one of the tables.
> It would have been very simple, but in one table Course Code can be not
> 1 course code, but several, like: CBEA2B0886,CBEA2B0887. As a result,
> if I join tables by course code field, both these courses are not
> found, when they are perfectly present.
> I know how to do this in code. My question is, is it possible to do
> without code, on query level? If yes, how? Thank you.
> Galina
>[/color]


Closed Thread