Posted on: 6/19/2013 3:09:27 AM | Views : 465

Maybe, one of you gurus can help me out again on this one.
I have a stored proc called sp_signup()
The stored proc first checks to see if the user has already signed up. If yes, then inform the user that s/he has already signed up for this class.
SET @ERROR = 'You have already signed up for this training'
This works a treat.
If no, then check to see if there are still available seats.
If seats are still available, sign the user up by inserting into training table and inform the user s/her has been signed up.
SET @ERROR = 'You have been registered for this class'
This works a treat.
If no seats remain, then put the user on waiting list by inserting the user's registration info into waitingList table and inform the user s/he has been placed on waiting list.
SET @ERROR = 'Sorry, but this class is full. However, you have been placed on waiting list.'
This works a treat as well.
So, th ...

Go to the complete details ...