SQL Server: Using Parameters and Local Variables

I was trying to get a stored procedure in SQL Server to run using a mixture of parameters passed from an ASP.NET page and a local variable which I wanted to declare in order to modify one of the parameters received.

I couldn't figure out where to put the local variable in relation to the parameters, until I found this page:


The parameters go before the 'AS' statement, the local variable after, but before the 'BEGIN' statement if you use it.

Digg This
Reddit This
Stumble Now!
Share on Facebook
Bookmark this on Delicious
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Buzz this!

Printed from: https://www.divydovy.com/2008/08/sql-server-using-parameters-and-local-variables/. © divydovy 2019

Leave a Reply