I'd need to know how to parse a query to know if it is well build before executing it. If the parsing is correct then execute it, if not discard it.
I haven't been able to accomplish this using SET NOEXEC, SET PARSEONLY, TRY/CATCH.
I m using dynamic sql inside a loop. Sometimes the dynamic sql is incorrect not for my fault but for the information existing in the database. For this reason I would like to parse it before execution.