Re: Unmatch return query



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




.



Relevant Pages

  • Re: Sql Date Question
    ... what dates are you using (what does the SQL end up looking ... T.AppDate BETWEEN:StartDate AND:EndDate ... StartDate and EndDate ... Add('Where APPTDATE>= ' + ...
    (borland.public.delphi.database.ado)
  • Re: find start and end dates from group of consecutive dates
    ... Hash: SHA1 ... MAXAs EndDate ... Below is the SQL with my table names, ... SELECT tblDateQ.machineName, MinAS StartDate, Max ...
    (comp.databases.ms-access)
  • Re: Report doesnt show all records between dates
    ... I have added the statements into Parameter list, on query. ... This is the SQL: ... StartDate, group on Month, Keep Together: ... When I run report, enter StartDate and EndDate, and click on OK, it's ...
    (microsoft.public.access.reports)
  • Re: Unmatch return query
    ... Repeat for endDate. ... The simplest method is to just enter the SQL into the SQL window (menu bar ... StartDate DATE ... need to compare StartDate an EndDate with same Emp number, ...
    (microsoft.public.access.queries)
  • Re: Calculate Age in table from Date of Birth and Current Date (MS
    ... 'StartDate' and 'EndDate' cross-references in the with ASK fields to solicit ... you might see where the bookmarks and fields are more easily if you ...
    (microsoft.public.word.tables)

Loading