Hello Sarah,
Another thing to consider is the data type of the date fields. Are they just date or are they datetime type fields. If datetime, then this will pose a problem that I ran into in the past...
Change your SQL where condition based on just the fields, not necessarily using
dtosdate (from field selection), but
e.entrydate >= ?dLowerEntry and e.entrydate <= ?dUpperEntry
Also, if it IS a datetime entry, make sure your parameterized values account for it by using the full day range by converting to DATETIME().
Example:
dLowerEntry = {6/5/1998}
dUpperEntry = {6/5/1998}
select *;
from a, b, c, d, e;
where dtot( dLowerentry ) >= e.entrydate;
and e.entrydate < dtot( dUpperEntry +1 )
When the are converted, they will convert to
6/5/1998 12:00am and 6/6/1998 12:00am
Therefore the upper must be LESS without the equal sign and this will get all times within the given date range...
Hope this may help to solve your dilemma.