Stored Procedure HELP
Posted on 2014-04-28
I need this stored Procedure to get the value from the dropdownlist (WSID) pass that value to another table (foreigned keyed). I then need to see the FirstName and LastName of the correspnding participants that linc to the WSID.
Tables: i have two - Workshop and Participants
WSID - Prim key in Workshop
WorkshopID - foreign key to WSID in Participants
On my webpage - the user picks from a drop down list the WSID. then hits submit. On the button click I need the stored procedure to take the correct WSID and show in the gridview the correct Participants attending that WSID.
Here is the stored procedure I have so far- As you guessed it DOESN'T work. Any Help thanks
ALTER PROCEDURE dbo.StoredProcedure7
SELECT Participants.FirstName, Participants.LastName, Participants.WorkshopID, Workshop.WSID
INNER JOIN Workshop on Participants.WorkshopID = Workshop.WSID
WHERE Workshop.WSID = @WS_number