I have a web page with a link to a stored procedure and I want to pass a variable to the stored procedures select statement. The code so far is -
ALTER procedure [dbo].[RTO]
@Weeknumber int,
@asset nvarchar(50)
AS
Begin
SELECT @asset
FROM RTO_weeklyanalysis
Where weekNumber = @weeknumber
END
basically the @asset will be the name of the column but this will change depending on what the user selects on the page.