how to pass parameter values at run time in stored proc.
for ex: when i try to pass the start date and end date the values are not being passed, is there any way to pass the value something like ‘?’ in T-SQL.
exec SP '01-01-2011','01-30-2011'
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There are a lot of resources out there. Just using google I found several articles including a question here on SO.
Can a stored procedure have dynamic parameters to be used in an "IN" clause?
T-SQL Stored Procedures Using Parameters
If you post some your stored procedure, then it will give a better idea of your code.
Here is an example from the MSDN website:
Then executing it