Select * From table
Where datecol Between '07/01/2001/ And '07/31/2001'
Or
Select * From table
Where datecol >= '07/01/2001/ And datecol <= '07/31/2001'
Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it and comment if you have time. NOTE: Reference to the FAQ is part of my signature and is not directed at any individual.
Looks like Terry and I saw your post at about the same time.
Two points bear mentioning here:
1. Terry's query includes quotes around the date strings, which WILL be necessary if you are using literals instead of variables for the comparison.
2. Be sure to use the date format your database expects. In Oracle, the default format is '08-AUG-01', but it may be different for your particular RDBMS or setup.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.