Click here to Skip to main content
15,881,139 members
Articles / Database Development / SQL Server / SQL Server 2008

How to use a variable in a select statement for a declare cursor

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
27 Dec 2012CPOL 0  
While you can use EXECUTE[^] to run a dynamic SQL statement, I'm really suspicious if this is a good approach.If you dynamically define the result set columns wouldn't this result into a situation where you have difficulties in selecting the values from the cursor since you don't know the...

Revisions


  

Compare Revision Minor Date Status Editor
2 - publicly available No 27-Dec-12 12:00 Available Wendelius
Updates in content. 76 changes had been made.
1 No 27-Dec-12 10:21 Available Wendelius

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
Europe Europe
Biography provided

Comments and Discussions