Question : Select Query to identify when a customer ID exists during the same time period

I have a list of events that occur at specific times between two customers. I need to isolate any instance where the same person is in two seperate locations at the same time.  For example I have simplified the schema.

EventID        Cust1        Cust2          LocationID         EventTime
------------------------------------------------------------------------------------
1                     1                 2                  1                  9/1/2010 8:00
2                     1                 3                  1                  9/1/2010 9:00
3                     4                 1                  3                  9/1/2010 8:00
4                     1                 5                  3                  9/1/2010 9:00

In the above instance I need a query that returns rows 1,3 and 4 because customer 1 can't be at location 1 and location 3 at the same times.  Hopefully this makes sence, if not please let me know.

Thanks,

Answer : Select Query to identify when a customer ID exists during the same time period

Not a big fan of this design--it's denormalized--but here goes...

1:
2:
3:
4:
SELECT t1.*
FROM tblEvents t1 INNER JOIN
    tblEvents t2 ON t1.EventID <> t2.EventID AND t1.EventTime = t2.EventTime AND
    (t1.Cust1 = t2.Cust1 OR t1.Cust1 = t2.Cust2 OR t1.Cust2 = t2.Cust1 OR t2.Cust1 = t2.Cust2)
Random Solutions  
 
programming4us programming4us