Query Oddity

Geoff Canyon gcanyon at inspiredlogic.com
Mon Sep 15 02:29:00 CDT 2003


I'm sure this is a newby question, so apologies in advance:

Why would the first query below return more results than the second 
query? The first has an added restricting clause, so it should, if 
anything, return fewer rows. But the result I see is that it returns 
more rows, seemingly ignoring some of the earlier clauses:

SELECT Recurrences.ScheduledStartDateTime, 
Recurrences.ScheduledEndDateTime, Events.Subject, Recurrences.RecID
FROM Events,Recurrences
WHERE ((Recurrences.ScheduledEndDateTime >= '7/27/2003' AND 
Recurrences.ScheduledStartDateTime <= '9/6/2003 23:59:59') AND 
Events.Duration >= 86400) AND Events.EventType <> 'ToDo'
ORDER BY Recurrences.ScheduledStartDateTime

SELECT Recurrences.ScheduledStartDateTime, 
Recurrences.ScheduledEndDateTime, Events.Subject, Recurrences.RecID
FROM Events,Recurrences
WHERE ((Recurrences.ScheduledEndDateTime >= '7/27/2003' AND 
Recurrences.ScheduledStartDateTime <= '9/6/2003 23:59:59') AND 
Events.Duration >= 86400) ORDER BY Recurrences.ScheduledStartDateTime

regards,

Geoff Canyon
gcanyon at inspiredlogic.com



More information about the Valentina mailing list