September 13, 2001 at 2:27 pm
I'm using a stored procedure to build a complex Select statement based on parameters passed to it. That part is going ok, but I'm not sure how to execute the select statement once it is stored in a variable. Thank you in advance...
September 13, 2001 at 2:40 pm
This is part of a script that has the set statement and then the execute statement.
set @sqlstring = ('dbcc checkident '+@tab_name+')')
exec (@sqlstring)
Let me know if you need more detail than that or, post some code we can look at.
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
September 13, 2001 at 2:43 pm
I think that will do it. I should have guessed it would be something simple. Thanks for your help.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy