Checking SQL synatax programically?

  • Is it possible to check syntax of SQL pragmatically before the execution?

    Of course I can wrap the execution into transaction and roll it back at the end but it is not the best solution from performance point of view.

    Any suggestions will be appreciated.

  • I think DMO has a method that will let you do the parse - basically the same functionality you see in QA that lets you check the query before you run it.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • How about Display Estimated Execution Plan in Query Analyzer (CNTL L)? If the syntax is incorrect this will give you an error.

    Francis

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply