Is there the option to check syntax after I have completed create a query? If so, where can I find it? What does it validate and what does it not validate?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can click the
Parse querybutton in Management Studio. It’s the blue check mark on the toolbar (you can also use Ctrl + F5):This only validates syntax, and doesn’t check that the objects you’ve referenced exist, that joins are valid, etc. For example the following parses correctly since deferred resolution assumes that by the time you run the query “for real” the object will exist:
This also passes parsing:
Even though
sys.objectsexists but does not contain the columnbar.It is essentially the same mechanism that allows you to compile a stored procedure that references objects that don’t exist yet (which of course will fail at runtime).