<?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/"
		>
<channel>
	<title>Comments on: SQL Server Object Exists Function</title>
	<atom:link href="http://jagregory.com/writings/sql-server-object-exists-function/feed/" rel="self" type="application/rss+xml" />
	<link>http://jagregory.com/writings/sql-server-object-exists-function/</link>
	<description>Monkeying with the code</description>
	<lastBuildDate>Tue, 29 Jun 2010 13:30:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Brendan Hemens</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-17749</link>
		<dc:creator>Brendan Hemens</dc:creator>
		<pubDate>Fri, 03 Apr 2009 14:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-17749</guid>
		<description>One advantage of Chris&#039;s method is that it finds temporary tables (if directed to the tempdb, as in IF OBJECT_ID(&#039;tempdb..#temp&#039;) IS NOT NULL, where the original code does not. Whether you should be using temp tables or not...well...</description>
		<content:encoded><![CDATA[<p>One advantage of Chris&#8217;s method is that it finds temporary tables (if directed to the tempdb, as in IF OBJECT_ID(&#8216;tempdb..#temp&#8217;) IS NOT NULL, where the original code does not. Whether you should be using temp tables or not&#8230;well&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-17204</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Mon, 23 Mar 2009 14:08:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-17204</guid>
		<description>Thanks Chris, that&#039;s actually what I do nowadays :)</description>
		<content:encoded><![CDATA[<p>Thanks Chris, that&#8217;s actually what I do nowadays <img src='http://jagregory.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-17203</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Mon, 23 Mar 2009 14:03:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-17203</guid>
		<description>I Realize this is an older post, but this might be helpful, and you don&#039;t need a custom function

To check the existance of a table, I use the following

IF OBJECT_ID(&#039;dbo.[TABLE_NAME&#039;,&#039;U&#039;) IS NOT NULL
DROP TABLE dbo.[TABLE_NAME]
GO

It takes a lot less effort and code, and works just as well as using the IF EXISTS(SELECT * FROM SYSOBJECTS.....) method.

Try it sometime!</description>
		<content:encoded><![CDATA[<p>I Realize this is an older post, but this might be helpful, and you don&#8217;t need a custom function</p>
<p>To check the existance of a table, I use the following</p>
<p>IF OBJECT_ID(&#8216;dbo.[TABLE_NAME','U') IS NOT NULL<br />
DROP TABLE dbo.[TABLE_NAME]<br />
GO</p>
<p>It takes a lot less effort and code, and works just as well as using the IF EXISTS(SELECT * FROM SYSOBJECTS&#8230;..) method.</p>
<p>Try it sometime!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl Rove</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-16547</link>
		<dc:creator>Karl Rove</dc:creator>
		<pubDate>Sun, 01 Mar 2009 21:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-16547</guid>
		<description>Great Posting James! - this is exactly what I was looking for!

Keep up the great work!
kr</description>
		<content:encoded><![CDATA[<p>Great Posting James! &#8211; this is exactly what I was looking for!</p>
<p>Keep up the great work!<br />
kr</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rose</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-10130</link>
		<dc:creator>Rose</dc:creator>
		<pubDate>Mon, 01 Sep 2008 09:46:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-10130</guid>
		<description>I found that the last bit of code:
&#039;IF OBJECT_ID(N’TR_Campaigns_BEFORE_UPDATE’, N’TR’) IS NOT NULL&#039;
doesn&#039;t work...it says the command has completed successfully but it doesn&#039;t actually drop the table, as when I try to re-create the table it already exists.

Thank you all very much for your help on this topic - was a real life saver, I&#039;ve been getting really annoyed with having to manually drop all my temp tables!</description>
		<content:encoded><![CDATA[<p>I found that the last bit of code:<br />
&#8216;IF OBJECT_ID(N’TR_Campaigns_BEFORE_UPDATE’, N’TR’) IS NOT NULL&#8217;<br />
doesn&#8217;t work&#8230;it says the command has completed successfully but it doesn&#8217;t actually drop the table, as when I try to re-create the table it already exists.</p>
<p>Thank you all very much for your help on this topic &#8211; was a real life saver, I&#8217;ve been getting really annoyed with having to manually drop all my temp tables!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-2208</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 13 Oct 2007 02:49:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-2208</guid>
		<description>IF OBJECT_ID(N&#039;TR_Campaigns_BEFORE_UPDATE&#039;, N&#039;TR&#039;) IS NOT NULL

This one seems to work for me.</description>
		<content:encoded><![CDATA[<p>IF OBJECT_ID(N&#8217;TR_Campaigns_BEFORE_UPDATE&#8217;, N&#8217;TR&#8217;) IS NOT NULL</p>
<p>This one seems to work for me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: James Gregory</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-1522</link>
		<dc:creator>James Gregory</dc:creator>
		<pubDate>Thu, 20 Sep 2007 08:26:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-1522</guid>
		<description>Amen. Perhaps I should have said &quot;one of the many things...&quot;.

Microsoft always seem to be behind the curve with most things. I&#039;d say that mainstream use of spatial data has been minimal in the past few years, enough so that it hasn&#039;t been a priority for Microsoft. However, with the boom of Google Maps style applications they&#039;re really going to need to play catch-up.</description>
		<content:encoded><![CDATA[<p>Amen. Perhaps I should have said &#8220;one of the many things&#8230;&#8221;.</p>
<p>Microsoft always seem to be behind the curve with most things. I&#8217;d say that mainstream use of spatial data has been minimal in the past few years, enough so that it hasn&#8217;t been a priority for Microsoft. However, with the boom of Google Maps style applications they&#8217;re really going to need to play catch-up.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://jagregory.com/writings/sql-server-object-exists-function/comment-page-1/#comment-1521</link>
		<dc:creator>John</dc:creator>
		<pubDate>Thu, 20 Sep 2007 08:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.jagregory.com/?p=11#comment-1521</guid>
		<description>When you say one of the few things MySQL has SQL Server over the barrel, you might add support for spatial data types. It is an enduring mystery why in these times of ubiquitous spatial data and location based services MS hasn&#039;t seen fit to offer what Postgres, Oracle and MySQL have for years. There is, of course, also the not insignificant issue of cost and open source code.</description>
		<content:encoded><![CDATA[<p>When you say one of the few things MySQL has SQL Server over the barrel, you might add support for spatial data types. It is an enduring mystery why in these times of ubiquitous spatial data and location based services MS hasn&#8217;t seen fit to offer what Postgres, Oracle and MySQL have for years. There is, of course, also the not insignificant issue of cost and open source code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
