Link to home
Start Free TrialLog in
Avatar of synergeticsoul
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=sjEventsAudio.sjEventID
INNER JOIN sjEventsShow
ON sjEventsShow.sjEventID=sjEventsSegments.sjEventID
WHERE sjEventsShow.airdate <= #createodbcdatetime(now())#
AND sjEventsShow.showno=7
AND sjEventsAudio.sizeType=2  <!--- Always stays the same --->
ORDER BY sjEventsSegments.sjEventID ASC
Avatar of adonis1976
adonis1976

what i see from ur statement is that no two shows can be played at the same time.. am i right?
Avatar of synergeticsoul

ASKER

correct.  however, everything is archived.  

i don't want to have to manually enter

AND sjEventsShow.showno=7 (showno changes)

every week.
ASKER CERTIFIED SOLUTION
Avatar of adonis1976
adonis1976

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
okay.  I will try that (since the shows have just started)
is there any other way to handle this?