Hey everyone,
First post (of hopefully many) to come...
I am currently writing a little Football Pool Application and I need to create a trigger (I think anyways) but I cannot for the life of me figure it out.
I won't bore people with the entire schema. What is needed to know is that I have a "Game" table which stores the ID's of two teams playing, and their respective scores (0 until after the game ends), I have a UserTable which stores a "card id" (basically a set of picks) and then I have UserPicksTable which basically just links to the UserCards as well as has a "WinningTeam" field, which will hold the ID of the team that the user in question has picked to win.
So every Tuesday morning I will enter the game scores into the "Game" table and I want this trigger to give a point to all the users that picked that game correctly...
If anyone could give me a hand, or a boot, in the right direction it would be a huge help. I can't even figure out where to start...
thanks,
--dbWhich database is it? Triggers sound like Oracle; if so, perhaps you could consider using a job scheduler (DBMS_JOB or DBMS_SCHEDULER) which would, depending on the results, send mail to users (or even all of them).
No comments:
Post a Comment