Re: Unmatch return query
- From: "John Spencer" <spencer@xxxxxxxxx>
- Date: Thu, 15 Jun 2006 07:31:47 -0400
SELECT T1.*
FROM T1 LEFT JOIN T2
ON T1.Emp = T2.Emp and
T1.StartDate = T2.StartDate and
T1.EndDate = T2.EndDate
WHERE T2.Emp is Null
In the unmatched query that you already have, you can double click on the
join line between the emp fields and observe the join choice.
Create a join between startdate fields (drag from one to the other) and them
double click that line and make the same choice
Repeat for endDate.
The simplest method is to just enter the SQL into the SQL window (menu bar
View: SQL)
"Carlos" <a@xxxxxxxxxxxx> wrote in message
news:%230v3dN5jGHA.4212@xxxxxxxxxxxxxxxxxxxxxxx
Hello, i newbie in queries and try the unmactch query but only one field
is compare
I have 2 tables (T1,T2) with identical fields
Emp NUMBER
StartDate DATE
EndDate DATE
Ex.
T1
| Emp | StartDate | EndDate |
| 100 | 2006-01-02 | 2006-01-10 |
| 100 | 2006-05-02 | 2006-05-10 |(1)
| 100 | 2006-07-02 | 2006-07-10 |(2)
T2
| Emp | StartDate | EndDate |
| 100 | 2006-01-02 | 2006-01-10 |
| 100 | 2006-07-02 | 2006-07-09 |(2)
(1) not exist T2
(2) not same EndDate
Return
| Emp | StartDate | EndDate |
| 100 | 2006-05-02 | 2006-05-10 |
| 100 | 2006-07-02 | 2006-07-10 |
need to compare StartDate an EndDate with same Emp number, it's possible
Thank's
.
- Follow-Ups:
- Re: Unmatch return query
- From: Carlos
- Re: Unmatch return query
- References:
- Unmatch return query
- From: Carlos
- Unmatch return query
- Prev by Date: Re: Existing Database - Create new or Fix existing?
- Next by Date: Re: Existing Database - Create new or Fix existing?
- Previous by thread: Re: Unmatch return query
- Next by thread: Re: Unmatch return query
- Index(es):
Relevant Pages
|
Loading