if(filename==x)
exec stored procedure1
else if (filename==y)
exec stored procedure2
else
exec stored procedure3
filename is stored in a table .
How to do this in sql server?
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.
Is there a part you’re having trouble with? This is how you would get the file name from a table:
The syntax for if statements is
Executing a stored procedure is done with
exec, just like in your pseudo code.