Click to See Complete Forum and Search --> : SQL Query Analyser...


manu.patel
October 31st, 2007, 07:33 AM
Hi All,

I am planning to develop a SQL Query analyser. I am using SQL Server 2000. Now the problem is that HOW I CAN CHECK WHETHER THE QUERY (SYNTEX) IS RIGHT OR NOT.

Hope a positive response...



.

hspc
November 2nd, 2007, 07:24 AM
you need to first SET PARSEONLY ON before executing the query, for example:
SET PARSEONLY ON
Select * from acc
this returns: Command(s) completed successfully.

SET PARSEONLY ON
Select *erwe from acc
this returns: Msg 102, Level 15, State 1, Line 3
Incorrect syntax near 'erwe'.