simple SQL query question

Josh Hillman ( (no email) )
Mon, 24 Mar 1997 10:44:17 -0500

When executing a SQL query that has many mentions of the same dates/times
throughout it, can that date be replaced by "variable"? In other words
something like this:

startdate = "Mar 17 1997 12:00AM"
enddate = "Mar 24 1997 12:00AM"

select somecolumns
from sometable
where date > startdate
and date < enddate

select someothercolumns
from someothertable
where date > startdate
and date < enddate

This is no big deal if the dates are only mentioned once, but if the same
ones are all over the place and the dates need to be adjusted from week to
week, redoing all the dates can drive me crazy...

Thanks for any insight,

Josh Hillman
hillman@talstar.com