|
Posted by Erland Sommarskog on 06/09/05 00:42
Stu (stuart.ainsworth@gmail.com) writes:
> If you want to continue along this path, then you need to construct
> your entire SQL statement as a variable,
NO!!!!!
This is a possible solution, but there is no "need" to use it. It is
in fact one of the poorest solutions there is.
Please look at http://www.sommarskog.se/arrays-in-sql.html for a whole
range of alternatives, and why dynamic SQL is so bad.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|