Hi,
I'm executing following query from C# code.
Set Showplan_xml on\rGo\r--Query--\rGo\rSet Showplan_xml off\rGo
So that it will be executed as
Set Showplan_xml on
Go
--Query--
Go
Set Showplan_xml off
Go
But I'm getting error that
Incorrect Syntax near 'Go'
The SET SHOWPLAN statements must be the only statements in the batch.
If i execute the same query in sql server it is working fine.