Dim testvar
testvar = ""sqlcmd.exe -S SERVERNAME\INSTANCENAME -U USERNAME -P PASSWORD -r1 -W -Q "select * from Event.dbo.ALL_EVENTS where (POLICY_TYPE!='LOGFILE' and state='OPEN' and Category like 'Windows-High' and not (POLICY_NAME like 'Level 2 and 3 alerts%') and not (TITLE like '%Level 2 :%') and not (TITLE like '%Level 3 :%') and (severity = 'MAJOR' or severity = 'MINOR' or severity = 'CRITICAL'))"" wscript.echo Command