Use:
SET NOEXEC ON
//user query
SET NOEXEC OFF
This will just compile the TSQL and wont actually execute it if the syntax is correct. An incorrect syntax will geneate an error.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for:
Professional Search Engine Optimization with ASP.NET
Professional IIS 7 and ASP.NET Integrated Programming
================================================== =========