automate querry

grizzlyjdw2

Registered User.
Local time
Yesterday, 23:49
Joined
Feb 26, 2009
Messages
22
is there a way to automate a querry to run for the current week?

for example if i ran it today it would run for 1-24-10 -- 1-30-10
 
To run a query each day for a week, you need to program the form timer event.
To run a query with a dynamic date variable, use
Code:
select * from tablename where somedate between date and date+7
Enjoy!
 
that isn't going to go back and pick up the previous days in the week is it?

like if i run it for jan 27 i want it to pull 1-24-10 -- 1-30-10

is that possible?
 
so you need to decide which week day is the first day (eg monday) and if today isnt a monday, go back till you get one.

then use mondaysdate to mondaysdate+6 (rather than plus 7)
 
ok, that makes sense. how would you do that in SQL though?
 

Users who are viewing this thread

Back
Top Bottom