Re: Compare 2 table & show detail both table
From: John Spencer (MVP) (spencer4_at_comcast.net)
Date: 04/30/04
- Next message: Matt: "Query criteria referencing field name no longer works"
- Previous message: Bill: "Urgent Update Query"
- In reply to: Mal: "Compare 2 table & show detail both table"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 29 Apr 2004 21:11:02 -0400
Post your SQL statement.
If you've used an Outer join then you should be ok. However, if you have
duplicate values in fieldA you can get multiple matches.
SELECT *
FROM Table1 Left Join Table2
ON Table1.A = Table2.A
If Table1 has three records and field A is "10", "10" and "20" in both and
Table2 has three records with values in A of "10","10", and "15", then you will
get 5 rows returned.
10, 10
10, 10
10, 10
10, 10
20, No Match
Mal wrote:
>
> I have 2 tables and one column in common in both. When I join them and wants some detial from one AND some detail from the other, result is not what I want.
>
> Expl. Table 1 has 500 rec with fields A and B and Table 2 has 300 rec with field A, C and D. Make a joint A->A.
> I want to see all 500 rec, but where Table 2 has no records just blank.
> When I do this I see I get 800 rec. Why?
- Next message: Matt: "Query criteria referencing field name no longer works"
- Previous message: Bill: "Urgent Update Query"
- In reply to: Mal: "Compare 2 table & show detail both table"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|