<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Explanation SQL Command GO</title>
	<atom:link href="http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Thu, 09 Feb 2012 10:31:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Vishal Tile</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-244420</link>
		<dc:creator><![CDATA[Vishal Tile]]></dc:creator>
		<pubDate>Fri, 27 Jan 2012 07:20:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-244420</guid>
		<description><![CDATA[Excellent Site!!!!!!!!!!!!!!!!!!!]]></description>
		<content:encoded><![CDATA[<p>Excellent Site!!!!!!!!!!!!!!!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh Kumar</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-155412</link>
		<dc:creator><![CDATA[Dinesh Kumar]]></dc:creator>
		<pubDate>Tue, 09 Aug 2011 13:40:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-155412</guid>
		<description><![CDATA[the above sp is not working properly... anyone help me...]]></description>
		<content:encoded><![CDATA[<p>the above sp is not working properly&#8230; anyone help me&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dinesh Kumar</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-155411</link>
		<dc:creator><![CDATA[Dinesh Kumar]]></dc:creator>
		<pubDate>Tue, 09 Aug 2011 13:40:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-155411</guid>
		<description><![CDATA[alter PROCEDURE Base_Sp_InsertFieldDisplayOrder
(    
@Template_No varchar(50),    
@Field_ID int,    
@DisplayOrder int,
@OrgName varchar(50)      
)    
as    
declare @sql1 nvarchar(4000)  
set @sql1=&#039;&#039;
set @sql1=&#039;   
aaa:  
if exists(select Field_Id from &#039;+ @OrgName +&#039;wdt_template_fields where  template_no=&#039; +convert(varchar(50),@Template_No) + &#039; and DisplayOrder=&#039; + convert(varchar(50),@DisplayOrder) +&#039;)    
begin 
	declare @DisplayOrder int
	set @DisplayOrder=0;
	set   @DisplayOrder  =  &#039; + convert(varchar(50),(@DisplayOrder + 1)) + &#039;
    goto aaa 
end    
else    
begin    
 update &#039;+ @OrgName +&#039;wdt_template_fields set DisplayOrder=&#039; +convert(varchar(50),@DisplayOrder)+&#039; where template_no=&#039; + convert(varchar(50),@Template_No) +&#039; and Field_id= &#039; +convert(varchar(50),@Field_ID) +&#039;;    
 update &#039;+ @OrgName +&#039;wdt_template_properties set DisplayOrder=&#039; +convert(varchar(50),@DisplayOrder)+&#039; where template_no=&#039; + convert(varchar(50),@Template_No) +&#039; and Field_id= &#039; +convert(varchar(50),@Field_ID) +&#039;;    
 update &#039;+ @OrgName +&#039;wdt_template_field_access_rights set DisplayOrder=&#039; +convert(varchar(50),@DisplayOrder)+&#039; where template_no=&#039; + convert(varchar(50),@Template_No) +&#039; and Field_id= &#039; +convert(varchar(50),@Field_ID) +&#039;;    
    
end&#039;

print  @sql1
--EXEC sp_executesql @sql1]]></description>
		<content:encoded><![CDATA[<p>alter PROCEDURE Base_Sp_InsertFieldDisplayOrder<br />
(<br />
@Template_No varchar(50),<br />
@Field_ID int,<br />
@DisplayOrder int,<br />
@OrgName varchar(50)<br />
)<br />
as<br />
declare @sql1 nvarchar(4000)<br />
set @sql1=&#8221;<br />
set @sql1=&#8217;<br />
aaa:<br />
if exists(select Field_Id from &#8216;+ @OrgName +&#8217;wdt_template_fields where  template_no=&#8217; +convert(varchar(50),@Template_No) + &#8216; and DisplayOrder=&#8217; + convert(varchar(50),@DisplayOrder) +&#8217;)<br />
begin<br />
	declare @DisplayOrder int<br />
	set @DisplayOrder=0;<br />
	set   @DisplayOrder  =  &#8216; + convert(varchar(50),(@DisplayOrder + 1)) + &#8216;<br />
    goto aaa<br />
end<br />
else<br />
begin<br />
 update &#8216;+ @OrgName +&#8217;wdt_template_fields set DisplayOrder=&#8217; +convert(varchar(50),@DisplayOrder)+&#8217; where template_no=&#8217; + convert(varchar(50),@Template_No) +&#8217; and Field_id= &#8216; +convert(varchar(50),@Field_ID) +&#8217;;<br />
 update &#8216;+ @OrgName +&#8217;wdt_template_properties set DisplayOrder=&#8217; +convert(varchar(50),@DisplayOrder)+&#8217; where template_no=&#8217; + convert(varchar(50),@Template_No) +&#8217; and Field_id= &#8216; +convert(varchar(50),@Field_ID) +&#8217;;<br />
 update &#8216;+ @OrgName +&#8217;wdt_template_field_access_rights set DisplayOrder=&#8217; +convert(varchar(50),@DisplayOrder)+&#8217; where template_no=&#8217; + convert(varchar(50),@Template_No) +&#8217; and Field_id= &#8216; +convert(varchar(50),@Field_ID) +&#8217;;    </p>
<p>end&#8217;</p>
<p>print  @sql1<br />
&#8211;EXEC sp_executesql @sql1</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kalidoss</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-87066</link>
		<dc:creator><![CDATA[kalidoss]]></dc:creator>
		<pubDate>Wed, 08 Sep 2010 10:46:39 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-87066</guid>
		<description><![CDATA[hi sir,
           its very usefull for me for your articles.....]]></description>
		<content:encoded><![CDATA[<p>hi sir,<br />
           its very usefull for me for your articles&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ElMatador</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-84680</link>
		<dc:creator><![CDATA[ElMatador]]></dc:creator>
		<pubDate>Thu, 19 Aug 2010 22:26:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-84680</guid>
		<description><![CDATA[Today I had a problem where we executed a sql script that included the following:

1. Use PaceFSdB
Go

2. If the procedure exists already Drop it.
Go

3. Create The Procedure

4. Grant Execute Permissions on the newly created Procedure.
Go

The problem:

Number 4 above would never execute. The Proc did not have execute permissions granted to dbml.

Notice on Number 3 above how we mistakenly omitted a GO statement after creating the procedure, which somehow was not executing Number 4 above correctly.

Why is this?

Thank you for all you informative posts.

ElMatador]]></description>
		<content:encoded><![CDATA[<p>Today I had a problem where we executed a sql script that included the following:</p>
<p>1. Use PaceFSdB<br />
Go</p>
<p>2. If the procedure exists already Drop it.<br />
Go</p>
<p>3. Create The Procedure</p>
<p>4. Grant Execute Permissions on the newly created Procedure.<br />
Go</p>
<p>The problem:</p>
<p>Number 4 above would never execute. The Proc did not have execute permissions granted to dbml.</p>
<p>Notice on Number 3 above how we mistakenly omitted a GO statement after creating the procedure, which somehow was not executing Number 4 above correctly.</p>
<p>Why is this?</p>
<p>Thank you for all you informative posts.</p>
<p>ElMatador</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: masterpiecebeta2</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-62137</link>
		<dc:creator><![CDATA[masterpiecebeta2]]></dc:creator>
		<pubDate>Thu, 04 Mar 2010 07:28:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-62137</guid>
		<description><![CDATA[simply understanable]]></description>
		<content:encoded><![CDATA[<p>simply understanable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Valerie</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-57561</link>
		<dc:creator><![CDATA[Valerie]]></dc:creator>
		<pubDate>Thu, 12 Nov 2009 21:37:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-57561</guid>
		<description><![CDATA[Are GOs implicit Commits? If I put a transaction around my script and hit an error, I thought it would rollback. But it doesn&#039;t. If I remove all my GOs then any schema changes I make in my script aren&#039;t accessible (meaning, say, if I created a table then I can&#039;t insert into it) so I can&#039;t run the sql I want to. I feel like I&#039;m between a rock and hard place.]]></description>
		<content:encoded><![CDATA[<p>Are GOs implicit Commits? If I put a transaction around my script and hit an error, I thought it would rollback. But it doesn&#8217;t. If I remove all my GOs then any schema changes I make in my script aren&#8217;t accessible (meaning, say, if I created a table then I can&#8217;t insert into it) so I can&#8217;t run the sql I want to. I feel like I&#8217;m between a rock and hard place.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-47207</link>
		<dc:creator><![CDATA[SQLAuthority News - Best Articles on SQLAuthority.com Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Tue, 24 Feb 2009 12:08:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-47207</guid>
		<description><![CDATA[[...] SQL SERVER - Explanation SQL Commando GO [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER &#8211; Explanation SQL Commando GO [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: krr</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-44528</link>
		<dc:creator><![CDATA[krr]]></dc:creator>
		<pubDate>Thu, 04 Dec 2008 10:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-44528</guid>
		<description><![CDATA[create table atable

DECLARE @i int
SET @i=1
while @i&lt;=100
begin
	insert atable default values
	go
	set @i=@i+1
end
select * from atable]]></description>
		<content:encoded><![CDATA[<p>create table atable</p>
<p>DECLARE @i int<br />
SET @i=1<br />
while @i&lt;=100<br />
begin<br />
	insert atable default values<br />
	go<br />
	set @i=@i+1<br />
end<br />
select * from atable</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-34826</link>
		<dc:creator><![CDATA[Phil]]></dc:creator>
		<pubDate>Thu, 03 Apr 2008 14:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-34826</guid>
		<description><![CDATA[Is there a way to determine which iteration of the batch is running when using GO [Count] to execute a batch multiple times?  I would like to loop through a batch and pass the batch number to a stored procedure called within the batch.  Is this possible?]]></description>
		<content:encoded><![CDATA[<p>Is there a way to determine which iteration of the batch is running when using GO [Count] to execute a batch multiple times?  I would like to loop through a batch and pass the batch number to a stored procedure called within the batch.  Is this possible?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER - Execute Same Query and Statement Multiple Times Using Command GO Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-command-go/#comment-32319</link>
		<dc:creator><![CDATA[SQL SERVER - Execute Same Query and Statement Multiple Times Using Command GO Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 11 Jan 2008 18:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/2007/05/11/sql-server-explanation-sql-commando-go/#comment-32319</guid>
		<description><![CDATA[[...] by pinaldave    Following question was asking by one of long time reader who really liked trick of SQL SERVER - Explanation SQL Command GO and SQL SERVER - Insert Multiple Records Using One Insert Statement - Use of UNION ALL. She asked [...]]]></description>
		<content:encoded><![CDATA[<p>[...] by pinaldave    Following question was asking by one of long time reader who really liked trick of SQL SERVER &#8211; Explanation SQL Command GO and SQL SERVER &#8211; Insert Multiple Records Using One Insert Statement &#8211; Use of UNION ALL. She asked [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

