Check SQL syntax

  • Thread starter Thread starter WF
  • Start date Start date
W

WF

Hello,
I don't know if it is the right place for my question but I would like to
know if ther's a way to validate a SQL request before sending it to the
database. I was thinking abut using Regular Expresssion or something like
that .
Thanks for your answer.
 
Hi,

Syntax depends on specific database and I do not think there is universal
way to do this, but in a case of SQL Server you could do this if you send
SET NOEXEC ON statement and then actual SQL statement to the server. SET
NOEXEC ON option tells SQL Server just to check syntax of the query without
executing it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top