<?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; Curious Case of Disappearing Rows &#8211; ON UPDATE CASCADE and ON DELETE CASCADE &#8211; T-SQL Example &#8211; Part 2 of 2</title>
	<atom:link href="http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Thu, 20 Jun 2013 06:37:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Rodwell</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-461352</link>
		<dc:creator><![CDATA[Rodwell]]></dc:creator>
		<pubDate>Mon, 22 Apr 2013 11:32:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-461352</guid>
		<description><![CDATA[Hi Pinal;

I also have a case of disappearing data. Some guys came over the weekend and worked in our main system which uses a SQL Server 2008 back-end. They actually printed some reports from the application of the work that they had done. However, on checking in the system today, there is no record that they did anything. I have also checked the database and there isn&#039;t anything. I have so much confidence in the application as it is a well known ERP system that we have been using since 2003. Can SQL Server be the culprit here?]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal;</p>
<p>I also have a case of disappearing data. Some guys came over the weekend and worked in our main system which uses a SQL Server 2008 back-end. They actually printed some reports from the application of the work that they had done. However, on checking in the system today, there is no record that they did anything. I have also checked the database and there isn&#8217;t anything. I have so much confidence in the application as it is a well known ERP system that we have been using since 2003. Can SQL Server be the culprit here?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-431618</link>
		<dc:creator><![CDATA[Dave]]></dc:creator>
		<pubDate>Mon, 04 Mar 2013 18:16:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-431618</guid>
		<description><![CDATA[Systems of record usually don&#039;t allow hard deletes because of referential integrity problems like the one outlined here. A good solution is to create an IsActive column on the Products table.  A &quot;delete&quot; of a product would set this flag to False, which would be tantamount to saying that the product will no longer be offered for sale in the future.  Queries for new order screens would constrain on IsActive = True.  Inquiry screens looking up old orders would not constrain on the column, allowing the &quot;deleted&quot; products to still be displayed - this is obviously the right answer; just because a company no longer offers a product for sale does not mean that all sales records for that product should be expunged from the system.]]></description>
		<content:encoded><![CDATA[<p>Systems of record usually don&#8217;t allow hard deletes because of referential integrity problems like the one outlined here. A good solution is to create an IsActive column on the Products table.  A &#8220;delete&#8221; of a product would set this flag to False, which would be tantamount to saying that the product will no longer be offered for sale in the future.  Queries for new order screens would constrain on IsActive = True.  Inquiry screens looking up old orders would not constrain on the column, allowing the &#8220;deleted&#8221; products to still be displayed &#8211; this is obviously the right answer; just because a company no longer offers a product for sale does not mean that all sales records for that product should be expunged from the system.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Not Possible &#8211; Delete From Multiple Table &#8211; Update Multiple Table in Single Statement &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-353440</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Not Possible &#8211; Delete From Multiple Table &#8211; Update Multiple Table in Single Statement &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Thu, 27 Sep 2012 01:31:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-353440</guid>
		<description><![CDATA[[...] SQL SERVER – Curious Case of Disappearing Rows – ON UPDATE CASCADE and ON DELETE CASCADE – T-S... [...]]]></description>
		<content:encoded><![CDATA[<p>[...] SQL SERVER – Curious Case of Disappearing Rows – ON UPDATE CASCADE and ON DELETE CASCADE – T-S&#8230; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean B</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-344191</link>
		<dc:creator><![CDATA[Dean B]]></dc:creator>
		<pubDate>Thu, 13 Sep 2012 18:33:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-344191</guid>
		<description><![CDATA[Good article.  My solution would be to create a master products table, as you suggest in workaround 1, which includes an IsVisible column.  Then I would create a view, with the same name as the original table, which selected all the visible products.  This way the application code would not need to change - it would just be selecting from the view instead of the table.  Finally write &quot;instead of&quot; triggers for insert/update/delete on the view to make the appropriate changes to the master table (e.g. instead of delete, set IsVisible to false in master table).]]></description>
		<content:encoded><![CDATA[<p>Good article.  My solution would be to create a master products table, as you suggest in workaround 1, which includes an IsVisible column.  Then I would create a view, with the same name as the original table, which selected all the visible products.  This way the application code would not need to change &#8211; it would just be selecting from the view instead of the table.  Finally write &#8220;instead of&#8221; triggers for insert/update/delete on the view to make the appropriate changes to the master table (e.g. instead of delete, set IsVisible to false in master table).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pramod kumar singh</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-337678</link>
		<dc:creator><![CDATA[pramod kumar singh]]></dc:creator>
		<pubDate>Sun, 26 Aug 2012 17:48:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-337678</guid>
		<description><![CDATA[nullif  equivalent to case condition that is saying by msdn that link are:


http://msdn.microsoft.com/en-us/library/ms177562.aspx





what is wrong with followning case condition
(there is no data and type comptability related content in case condition so why do i get error in case condition)

------------------------------------------------


declare @expression1 varchar(33)
set @expression1=&#039;2d&#039;
declare @expression2 int
set @expression2=2
declare @a varchar(222)
set @a=CASE
		   WHEN (@expression1 IS NOT NULL) THEN @expression1 	
		   ELSE 
		       @expression2
		   END		
select @a

----------------------------------------------------------------------------
please provide me exact and absolute answer]]></description>
		<content:encoded><![CDATA[<p>nullif  equivalent to case condition that is saying by msdn that link are:</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms177562.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/ms177562.aspx</a></p>
<p>what is wrong with followning case condition<br />
(there is no data and type comptability related content in case condition so why do i get error in case condition)</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p>declare @expression1 varchar(33)<br />
set @expression1=&#8217;2d&#8217;<br />
declare @expression2 int<br />
set @expression2=2<br />
declare @a varchar(222)<br />
set @a=CASE<br />
		   WHEN (@expression1 IS NOT NULL) THEN @expression1<br />
		   ELSE<br />
		       @expression2<br />
		   END<br />
select @a</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
please provide me exact and absolute answer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sushil</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-332158</link>
		<dc:creator><![CDATA[Sushil]]></dc:creator>
		<pubDate>Fri, 17 Aug 2012 13:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-332158</guid>
		<description><![CDATA[Hi Pinal,

I would like to go with Workaround 2: Design Changes - Column IsVisible
As in future if user wants to add particular product in catalogue just changing the flag value, user will be able to add in product catalogue.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I would like to go with Workaround 2: Design Changes &#8211; Column IsVisible<br />
As in future if user wants to add particular product in catalogue just changing the flag value, user will be able to add in product catalogue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rithu</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-332137</link>
		<dc:creator><![CDATA[Rithu]]></dc:creator>
		<pubDate>Fri, 17 Aug 2012 12:44:17 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-332137</guid>
		<description><![CDATA[I like those bad advices actually. Rather they are the ones which went through my mind, when i thought for a workaround !!!]]></description>
		<content:encoded><![CDATA[<p>I like those bad advices actually. Rather they are the ones which went through my mind, when i thought for a workaround !!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mathias Keip</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-331981</link>
		<dc:creator><![CDATA[Mathias Keip]]></dc:creator>
		<pubDate>Fri, 17 Aug 2012 07:32:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-331981</guid>
		<description><![CDATA[In Workaround 3 Example 2 there are to variants I think:
1. Do not use ON DELETE CASCADE - Foreign key without Delete-Cascade means no delete on Products Table. You can bet on the following error: &quot;Help, we can not delete rows in the Product-Table.&quot;
2. Do not use a foreign key - Means we can delete in the products table without deleting the corresponding entries in the ProductDetails (Orphaned Data)]]></description>
		<content:encoded><![CDATA[<p>In Workaround 3 Example 2 there are to variants I think:<br />
1. Do not use ON DELETE CASCADE &#8211; Foreign key without Delete-Cascade means no delete on Products Table. You can bet on the following error: &#8220;Help, we can not delete rows in the Product-Table.&#8221;<br />
2. Do not use a foreign key &#8211; Means we can delete in the products table without deleting the corresponding entries in the ProductDetails (Orphaned Data)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Gupta</title>
		<link>http://blog.sqlauthority.com/2012/08/17/sql-server-curious-case-of-disappearing-rows-on-update-cascade-and-on-delete-cascade-t-sql-example-part-2-of-2/#comment-331890</link>
		<dc:creator><![CDATA[Shantanu Gupta]]></dc:creator>
		<pubDate>Fri, 17 Aug 2012 04:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=20337#comment-331890</guid>
		<description><![CDATA[Hi Pinal,

I am curious to know more about design problems. I recently saw an article on slowly changing dimernsion (http://en.wikipedia.org/wiki/Slowly_changing_dimension) but could not figure out how to use it in context with  foreign key relationship. It would be great if you can add something to this.]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,</p>
<p>I am curious to know more about design problems. I recently saw an article on slowly changing dimernsion (<a href="http://en.wikipedia.org/wiki/Slowly_changing_dimension" rel="nofollow">http://en.wikipedia.org/wiki/Slowly_changing_dimension</a>) but could not figure out how to use it in context with  foreign key relationship. It would be great if you can add something to this.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
