title: Pass a variable into a stored procedures SELECT command
body: <p>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 - </p>
  
  <pre><code>ALTER procedure [dbo].[RTO]
  
  @Weeknumber int,
  @asset nvarchar(50)
  AS
  
  Begin 
  
  SELECT @asset
  FROM RTO_weeklyanalysis
  Where weekNumber = @weeknumber
  
  END
  </code></pre>
  
  <p>basically the @asset will be the name of the column but this will change depending on what the user selects on the page.</p>