Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
Set Showplan_xml Problem
Set Showplan_xml Problem
Rate Topic
Display Mode
Topic Options
Author
Message
gaurangtalwadkar
gaurangtalwadkar
Posted Monday, May 10, 2010 9:23 AM
Forum Newbie
Group: General Forum Members
Last Login: Monday, May 17, 2010 6:02 AM
Points: 7,
Visits: 23
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.
Post #919102
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Monday, May 10, 2010 9:32 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 3:30 PM
Points: 31,436,
Visits: 13,751
What's in the query? Can you post it?
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #919120
HowardW
HowardW
Posted Monday, May 10, 2010 9:41 AM
Ten Centuries
Group: General Forum Members
Last Login: Today @ 10:22 AM
Points: 1,037,
Visits: 7,695
Go is not a T-SQL command, it's syntax used in Management Studio to signal the end of a batch. If you're submitting it from a .Net application, you have to submit the batches separately yourself.
Post #919127
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.