R
Roger Hembury
Hi
This has probably been asked quite a few times but I cannot find the
solution on Google so apologies for asking again.
I have two tables and I want to get a count of all the records in Table 2
but based on the records in Table 1.
Table 1
Field 1
A
B
C
D
E
Table 2
Field 1
A
B
C
D
A
B
C
D
The result I want to get is as follows -
A 2
B 2
C 2
D 2
E 0 <--- this is the bit I am having problems with :-(
All I can get at the moment is results A to D. E is completely ignored as
there are no records for it in Table 2.
I have seen this done before in one SQL statement but I cannot remember how
it was done.
Any pointers or the complete SQL statement would be appreciated.
Thanks
Roger
This has probably been asked quite a few times but I cannot find the
solution on Google so apologies for asking again.
I have two tables and I want to get a count of all the records in Table 2
but based on the records in Table 1.
Table 1
Field 1
A
B
C
D
E
Table 2
Field 1
A
B
C
D
A
B
C
D
The result I want to get is as follows -
A 2
B 2
C 2
D 2
E 0 <--- this is the bit I am having problems with :-(
All I can get at the moment is results A to D. E is completely ignored as
there are no records for it in Table 2.
I have seen this done before in one SQL statement but I cannot remember how
it was done.
Any pointers or the complete SQL statement would be appreciated.
Thanks
Roger