I a trying to make a query to activate a message only between certain times each day, over a certain number of days, the times being entered in a database or continuously from a given time to another time a week later.
This is an unattended shopfront type of display announcing specials only at certain times.
I have a columns for Startdate Stopdate StartTime StopTime
Case 1. I want it to show only during lunchtime only for the next week I would enter 10/8/11 17/8/11 12:00 13:00
Case 2. I might also want to show it continuously from 12:00 on 10/8/11 then stop showing at 13:00 or 17/8/11 which are the effectively the same dates.
My problem is how to construct the WHERE clause for the query that will work for both situations.
Other than have an extra column "Once a Day/Continuous" is there any other way?
This is an unattended shopfront type of display announcing specials only at certain times.
I have a columns for Startdate Stopdate StartTime StopTime
Case 1. I want it to show only during lunchtime only for the next week I would enter 10/8/11 17/8/11 12:00 13:00
Case 2. I might also want to show it continuously from 12:00 on 10/8/11 then stop showing at 13:00 or 17/8/11 which are the effectively the same dates.
My problem is how to construct the WHERE clause for the query that will work for both situations.
Other than have an extra column "Once a Day/Continuous" is there any other way?