synergeticsoul
asked on
Creating an automated process based on set dates
I would like to create an automated process for an online show.
I created a stored procedure that would allow me to insert the shows and update.
The admin first adds the show (number and date of airing). Then the admin adds the events, selects the corresponding show, and finally adds subsequent audio files for that event. This all works fine.
However, I want the shows to play automatically, based on date.
I have airdate (which is when the show will air) and the actual show number. The problem is that I tried to set the shows to air according to the date.
Show #4 will air on May 15, 2005. So Show 3, should still play until May 15, 2005. Currently, all shows play for a week. As each show is added, all have set airdates(which vary).
I tried the following in my query, but the Date portion seems useless. How can I modify this?
SELECT * FROM sjEventsSegments
INNER JOIN sjEventsAudio
ON sjEventsSegments.sjEventID =sjEventsA udio.sjEve ntID
INNER JOIN sjEventsShow
ON sjEventsShow.sjEventID=sjE ventsSegme nts.sjEven tID
WHERE sjEventsShow.airdate <= #createodbcdatetime(now()) #
AND sjEventsShow.showno=7
AND sjEventsAudio.sizeType=2 <!--- Always stays the same --->
ORDER BY sjEventsSegments.sjEventID ASC
I created a stored procedure that would allow me to insert the shows and update.
The admin first adds the show (number and date of airing). Then the admin adds the events, selects the corresponding show, and finally adds subsequent audio files for that event. This all works fine.
However, I want the shows to play automatically, based on date.
I have airdate (which is when the show will air) and the actual show number. The problem is that I tried to set the shows to air according to the date.
Show #4 will air on May 15, 2005. So Show 3, should still play until May 15, 2005. Currently, all shows play for a week. As each show is added, all have set airdates(which vary).
I tried the following in my query, but the Date portion seems useless. How can I modify this?
SELECT * FROM sjEventsSegments
INNER JOIN sjEventsAudio
ON sjEventsSegments.sjEventID
INNER JOIN sjEventsShow
ON sjEventsShow.sjEventID=sjE
WHERE sjEventsShow.airdate <= #createodbcdatetime(now())
AND sjEventsShow.showno=7
AND sjEventsAudio.sizeType=2 <!--- Always stays the same --->
ORDER BY sjEventsSegments.sjEventID
what i see from ur statement is that no two shows can be played at the same time.. am i right?
ASKER
correct. however, everything is archived.
i don't want to have to manually enter
AND sjEventsShow.showno=7 (showno changes)
every week.
i don't want to have to manually enter
AND sjEventsShow.showno=7 (showno changes)
every week.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
okay. I will try that (since the shows have just started)
ASKER
is there any other way to handle this?