Disable TSQL script check?

Posted by grady on Stack Overflow See other posts from Stack Overflow or by grady
Published on 2010-03-29T15:33:13Z Indexed on 2010/03/29 15:43 UTC
Read the original article Hit count: 307

Filed under:

Hi, lets say I have a script like that:

if(some condition) begin select somecolumn from sometable end

Lets say, that "somecolumn" does not exist and the condition is not true, which means the select is NOT executed. Even though the select would not be executed, the script is not valid, Management Studio complains about the missing column "somecolumn".

Question: Can I somehow disable this sort of check so that the script is executed and since the if is not true, it will never notice that the column is missing?

Thanks :-)

© Stack Overflow or respective owner

Related posts about tsql