|
-
Jan 11th, 2002, 02:32 PM
#1
Thread Starter
Lively Member
SQL Query not returning all?
Anyone know why this query would return 12/1 dates but no 12/31 dates (cut off is 12/30)
SELECT *
FROM Tracking
WHERE (Visited >= '12/01/01') AND (Visited <= '12/31/01')
ORDER BY Visited DESC
-
Jan 11th, 2002, 03:18 PM
#2
Hyperactive Member
Your defined cutoff is at the stroke of midnight 12/31.
Chances are you want the entire day's activity, so
you'll get closer to what you intend using < '1/1/1'
-
Jan 11th, 2002, 03:20 PM
#3
Thread Starter
Lively Member
Yeah That's what I thought.. just thought it was funny... all my programming, no other language (that I can think of) excluded the day of a '<=' type comparison.. guess SQL is different. I thought maybe it was a known bug since it's the last day of the year, it didn't process it.. The expression is LESS THEN or EQUAL TOO... just funny.. anyway..
and quick tips on how to advance a form day by 1 in ASP?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|