<?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; Transaction and Local Variables &#8211; Swap Variables &#8211; Update All At Once Concept</title>
	<atom:link href="http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Sat, 25 May 2013 01:31:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-186438</link>
		<dc:creator><![CDATA[madhivanan]]></dc:creator>
		<pubDate>Tue, 01 Nov 2011 14:38:44 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-186438</guid>
		<description><![CDATA[update table
set col=case when col=&#039;M&#039; then &#039;F&#039; when col=&#039;F&#039; then &#039;M&#039; end]]></description>
		<content:encoded><![CDATA[<p>update table<br />
set col=case when col=&#8217;M&#8217; then &#8216;F&#8217; when col=&#8217;F&#8217; then &#8216;M&#8217; end</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amit Kumar Jain</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-185750</link>
		<dc:creator><![CDATA[Amit Kumar Jain]]></dc:creator>
		<pubDate>Mon, 31 Oct 2011 05:46:38 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-185750</guid>
		<description><![CDATA[it is a great query, how can we do it if we swap the values in the same column. Like we are storing &quot;Sex&quot; it may be &quot;F&quot; or &quot;M&quot; we have mistakenly store &quot;M&quot; in place of &quot;F&quot; and &quot;F&quot; in place of &quot;M&quot;.

Now I want to correct the &quot;Sex&quot;, I want to replace &quot;M&quot; to &quot;F&quot; and &quot;F&quot; to &quot;M&quot; on single column.]]></description>
		<content:encoded><![CDATA[<p>it is a great query, how can we do it if we swap the values in the same column. Like we are storing &#8220;Sex&#8221; it may be &#8220;F&#8221; or &#8220;M&#8221; we have mistakenly store &#8220;M&#8221; in place of &#8220;F&#8221; and &#8220;F&#8221; in place of &#8220;M&#8221;.</p>
<p>Now I want to correct the &#8220;Sex&#8221;, I want to replace &#8220;M&#8221; to &#8220;F&#8221; and &#8220;F&#8221; to &#8220;M&#8221; on single column.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dineshrajan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-135191</link>
		<dc:creator><![CDATA[dineshrajan]]></dc:creator>
		<pubDate>Thu, 19 May 2011 06:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-135191</guid>
		<description><![CDATA[Good one]]></description>
		<content:encoded><![CDATA[<p>Good one</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan Pretselman</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-126058</link>
		<dc:creator><![CDATA[Dan Pretselman]]></dc:creator>
		<pubDate>Fri, 01 Apr 2011 13:37:19 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-126058</guid>
		<description><![CDATA[Great examples, as always.

For more examples and explanations
you can refer to:

http://madebysql.blogspot.com/2010/04/local-variables-and-transaction-or-allhtml.]]></description>
		<content:encoded><![CDATA[<p>Great examples, as always.</p>
<p>For more examples and explanations<br />
you can refer to:</p>
<p><a href="http://madebysql.blogspot.com/2010/04/local-variables-and-transaction-or-allhtml" rel="nofollow">http://madebysql.blogspot.com/2010/04/local-variables-and-transaction-or-allhtml</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Srinivasan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62313</link>
		<dc:creator><![CDATA[Srinivasan]]></dc:creator>
		<pubDate>Sat, 06 Mar 2010 23:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62313</guid>
		<description><![CDATA[Hello Sir,

 Only today i came across your blog when searching for some sql clarifications. I read your blog. Its amazing. To be frank i was searching for such kind of blog for a long time. 

can you please give me solution for two of my Probs that i am facing for a long time?

1. What should i install in client place for running my application developed with SQL Server. Right Now am installing  MSDE, but is there any other solution for that coz its nearly 35 mb and my online clients feel its bit tedious.

2. What version of MSDE should I install for Windows 7 and Vista?

Thank you. Expecting for your reply.
With regards
Srinivasan. R]]></description>
		<content:encoded><![CDATA[<p>Hello Sir,</p>
<p> Only today i came across your blog when searching for some sql clarifications. I read your blog. Its amazing. To be frank i was searching for such kind of blog for a long time. </p>
<p>can you please give me solution for two of my Probs that i am facing for a long time?</p>
<p>1. What should i install in client place for running my application developed with SQL Server. Right Now am installing  MSDE, but is there any other solution for that coz its nearly 35 mb and my online clients feel its bit tedious.</p>
<p>2. What version of MSDE should I install for Windows 7 and Vista?</p>
<p>Thank you. Expecting for your reply.<br />
With regards<br />
Srinivasan. R</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62219</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 08:02:14 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62219</guid>
		<description><![CDATA[I dont understand what you say
Can you give more informations?

Regarding EXCEL, read this


http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926]]></description>
		<content:encoded><![CDATA[<p>I dont understand what you say<br />
Can you give more informations?</p>
<p>Regarding EXCEL, read this</p>
<p><a href="http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926" rel="nofollow">http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62218</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 08:01:20 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62218</guid>
		<description><![CDATA[Can you post the actual cod you used?]]></description>
		<content:encoded><![CDATA[<p>Can you post the actual cod you used?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarika</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62209</link>
		<dc:creator><![CDATA[Sarika]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 04:18:16 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62209</guid>
		<description><![CDATA[How can i retrieve data in the form of tables in the database from any mdf ,ldf ,ndf file &amp; excel sheet ?]]></description>
		<content:encoded><![CDATA[<p>How can i retrieve data in the form of tables in the database from any mdf ,ldf ,ndf file &amp; excel sheet ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sarika</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62208</link>
		<dc:creator><![CDATA[Sarika]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 04:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62208</guid>
		<description><![CDATA[if i write union keyword after select &#039;May&#039;,&#039;Fri&#039; this query then why it is not printing the previous values that are not swapped as when i did this it was showing the final values means swapped values.I couldn&#039;t understand this.]]></description>
		<content:encoded><![CDATA[<p>if i write union keyword after select &#8216;May&#8217;,'Fri&#8217; this query then why it is not printing the previous values that are not swapped as when i did this it was showing the final values means swapped values.I couldn&#8217;t understand this.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Order of Columns in Update Statement Does not Matter Journey to SQL Authority with Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-62202</link>
		<dc:creator><![CDATA[SQL SERVER – Order of Columns in Update Statement Does not Matter Journey to SQL Authority with Pinal Dave]]></dc:creator>
		<pubDate>Fri, 05 Mar 2010 01:31:47 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-62202</guid>
		<description><![CDATA[[...] SQL SERVER – Transaction and Local Variables – Swap Variables – Update All At Once Concept Update All at Once concept is purely based on Atomicity (link goes to Wikipedia). In an atomic transaction, a series of database operations, either all of them occur, or nothing occurs. A guarantee of atomicity prevents updates to the database occurring only partially, which can cause greater problems than rejecting the whole series outright. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Transaction and Local Variables – Swap Variables – Update All At Once Concept Update All at Once concept is purely based on Atomicity (link goes to Wikipedia). In an atomic transaction, a series of database operations, either all of them occur, or nothing occurs. A guarantee of atomicity prevents updates to the database occurring only partially, which can cause greater problems than rejecting the whole series outright. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-61959</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 01 Mar 2010 08:33:17 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-61959</guid>
		<description><![CDATA[What is the difference between my solution?
You just shortcut the variable names]]></description>
		<content:encoded><![CDATA[<p>What is the difference between my solution?<br />
You just shortcut the variable names</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dURGESH</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-55626</link>
		<dc:creator><![CDATA[dURGESH]]></dc:creator>
		<pubDate>Sat, 05 Sep 2009 18:52:21 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-55626</guid>
		<description><![CDATA[DECLARE @A INT, @B INT
SELECT  @A=1,@B=2
SELECT @A A,@B B
SELECT @A=@A+@B,@B=@A-@B,@A=@A-@B
SELECT @A A,@B B]]></description>
		<content:encoded><![CDATA[<p>DECLARE @A INT, @B INT<br />
SELECT  @A=1,@B=2<br />
SELECT @A A,@B B<br />
SELECT @A=@A+@B,@B=@A-@B,@A=@A-@B<br />
SELECT @A A,@B B</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Madhivanan</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-44033</link>
		<dc:creator><![CDATA[Madhivanan]]></dc:creator>
		<pubDate>Mon, 03 Nov 2008 13:57:18 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-44033</guid>
		<description><![CDATA[For valriable swappings, you dont need a temp variable


DECLARE @VarA INT
DECLARE @VarB INT
DECLARE @VarTemp INT

SET @VarA = 1
SET @VarB = 2

SELECT @VarA =@VarA +@VarB,@VarB=@VarA- @VarB,@VarA=@VarA-@VarB

SELECT @VarA VarA, @VarB VarB]]></description>
		<content:encoded><![CDATA[<p>For valriable swappings, you dont need a temp variable</p>
<p>DECLARE @VarA INT<br />
DECLARE @VarB INT<br />
DECLARE @VarTemp INT</p>
<p>SET @VarA = 1<br />
SET @VarB = 2</p>
<p>SELECT @VarA =@VarA +@VarB,@VarB=@VarA- @VarB,@VarA=@VarA-@VarB</p>
<p>SELECT @VarA VarA, @VarB VarB</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paris</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-44012</link>
		<dc:creator><![CDATA[Paris]]></dc:creator>
		<pubDate>Sat, 01 Nov 2008 23:33:02 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-44012</guid>
		<description><![CDATA[always ur articles r usefule .. merci ;)]]></description>
		<content:encoded><![CDATA[<p>always ur articles r usefule .. merci ;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Hung</title>
		<link>http://blog.sqlauthority.com/2008/10/20/sql-server-transaction-and-local-variables-swap-variables-update-all-at-once-concept/#comment-43822</link>
		<dc:creator><![CDATA[Jerry Hung]]></dc:creator>
		<pubDate>Mon, 20 Oct 2008 19:21:06 +0000</pubDate>
		<guid isPermaLink="false">http://sqlauthority.wordpress.com/?p=1402#comment-43822</guid>
		<description><![CDATA[This behaviour will be what I expected, thank god
being ATOMIC

For example
UPDATE table
SET column = GETDATE()

All columns obtain the same GETDATE() value, instead of milliseconds apart for a large table]]></description>
		<content:encoded><![CDATA[<p>This behaviour will be what I expected, thank god<br />
being ATOMIC</p>
<p>For example<br />
UPDATE table<br />
SET column = GETDATE()</p>
<p>All columns obtain the same GETDATE() value, instead of milliseconds apart for a large table</p>
]]></content:encoded>
	</item>
</channel>
</rss>
