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
 
Back
Top