sqlMessage: "You have an error in your SQL syntax; IF EXISTS (SELECT object_id FROM sys.tables code example
Example: if exists sql server
IF EXISTS (SELECT * FROM tblGLUserAccess WHERE GLUserName ='xxxxxxxx')
BEGIN
SELECT 1
END
ELSE
BEGIN
SELECT 2
END