<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">intellectually constipated</title><subtitle type="html">patrick gallucci's sql server brain drain
</subtitle><id>http://blogs.msdn.com/b/patrickgallucci/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/b/patrickgallucci/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2007-09-24T10:29:43Z</updated><entry><title>How to drop all tables, all views, and all stored procedures from a SQL 2005 DB...</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/04/29/how-to-drop-all-tables-all-views-and-all-stored-procedures-from-a-sql-2005-db.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2008/04/29/how-to-drop-all-tables-all-views-and-all-stored-procedures-from-a-sql-2005-db.aspx</id><published>2008-04-29T23:00:36Z</published><updated>2008-04-29T23:00:36Z</updated><content type="html">This is a follow-up to the blog entry from Jasper Jugan . This is a modification to the script to allow for schema specific deletes of the SP's, Views and I added Functions. &amp;#160; 

 create procedure usp_DropSPFunctionsViews 

 as 

 &amp;#160; 

 -- variable to object name 

 declare @name varchar (1000) 

 -- variable to hold object type 

 declare @xtype varchar (20) 

 -- variable to hold sql string 

 declare @sqlstring nvarchar(4000) 

 &amp;#160; 

 declare SPViews_cursor cursor...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/04/29/how-to-drop-all-tables-all-views-and-all-stored-procedures-from-a-sql-2005-db.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8439011" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="SQL Function" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Function/" /><category term="SQL Script" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Script/" /><category term="SQL Server Stored Procedure" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+Stored+Procedure/" /></entry><entry><title>The few, the proud, the fortunate. Microsoft Certified Architect Program</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/29/the-few-the-proud-the-fortunate-microsoft-certified-architect-program.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/29/the-few-the-proud-the-fortunate-microsoft-certified-architect-program.aspx</id><published>2008-02-29T22:51:38Z</published><updated>2008-02-29T22:51:38Z</updated><content type="html">And I really do mean fortunate. On March 10th I am to embark in five weeks of some of the toughest technical training that I will do during my career. I have been to week long ramp-ups and boot-camps to help facilitate learning during my career. But this is far and above anything that I think I endured or will ever go through again. This is not training to teach, but rather to enforce and to fill gaps. You must be nominated, then pass a pre-interview to make sure that you are qualified to attempt...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/29/the-few-the-proud-the-fortunate-microsoft-certified-architect-program.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7958895" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="SQL Server 2008" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+2008/" /><category term="Katmai" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Katmai/" /><category term="Microsoft Certified Architect" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Microsoft+Certified+Architect/" /><category term="Training" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Training/" /></entry><entry><title>Bricks seldom feel good.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/25/bricks-seldom-feel-good.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/25/bricks-seldom-feel-good.aspx</id><published>2008-02-26T02:41:43Z</published><updated>2008-02-26T02:41:43Z</updated><content type="html">Not much to say. I have been angry that he has not returned my emails. Sorry Ken. Ken Henderson &amp;#8211; We Will Always Remember You &amp;#160; Technorati Tags: Ken Henderson , SQL Server , SQL...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2008/02/25/bricks-seldom-feel-good.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=7897251" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>SQL Server Function to merge a date with a time</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/11/18/sql-server-function-to-merge-a-date-with-a-time.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/11/18/sql-server-function-to-merge-a-date-with-a-time.aspx</id><published>2007-11-19T05:03:46Z</published><updated>2007-11-19T05:03:46Z</updated><content type="html">I use this when I need to join two fields. One has a date, the other has a time. &amp;#160; IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_MergeDate2Time]' ) AND type in (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) 

 DROP FUNCTION [util].[uf_MergeDate2Time] 

 GO 

 CREATE FUNCTION [util].[uf_MergeDate2Time]( 

 @ date DATETIME, 

 @ time DATETIME 

 ) 

 RETURNS DATETIME 

 WITH EXECUTE AS CALLER 

 AS 

 /*************************************...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/11/18/sql-server-function-to-merge-a-date-with-a-time.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=6385343" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="Business Intelligence" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Business+Intelligence/" /><category term="SQL Function" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Function/" /><category term="SQL Server 2008" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+2008/" /><category term="Katmai" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Katmai/" /><category term="Data Warehouse" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Data+Warehouse/" /></entry><entry><title>Windows Mobile Slingbox and SlingPlayer Mobile</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/26/windows-mobile-slingbox-and-slingplayer-mobile.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/26/windows-mobile-slingbox-and-slingplayer-mobile.aspx</id><published>2007-10-26T19:34:28Z</published><updated>2007-10-26T19:34:28Z</updated><content type="html">So here is my 2nd favorite new gadget on my Windows Mobile device. With the 3G network speed and my SlingPlayer mobile, when I am not using Mobile Live search, I am either watching tv or listening to the news on my Windows Mobile Device. The quality is not great, but it is acceptable. I have been trying different settings, and over the past 2 weeks have gotten it to where there is little fragmentation on the screen. The more action on the screen lessens the quality, but the player is optimizing itself...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/26/windows-mobile-slingbox-and-slingplayer-mobile.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5693222" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="Windows Mobile" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Windows+Mobile/" /><category term="Gadgets" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Gadgets/" /></entry><entry><title>Live Search, Windows Mobile and my little GPS friend!</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/25/live-search-windows-mobile-and-my-little-gps-friend.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/25/live-search-windows-mobile-and-my-little-gps-friend.aspx</id><published>2007-10-26T04:11:46Z</published><updated>2007-10-26T04:11:46Z</updated><content type="html">I have really started to like my Samsung Blackjack running Windows Mobile lately. I am going to start to share some of my favorite applications and gadgets as time permits. My latest and probably favorite as of now is Live Search for Windows Mobile. I am not going to run down all the features, but share with you how I managed to get GPS working and how COOL this is. If you haven't seen it, check it out. I really think they need to give more information on this site, as I am sure that more people...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/10/25/live-search-windows-mobile-and-my-little-gps-friend.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5682518" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="GPS" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/GPS/" /><category term="Windows Mobile" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Windows+Mobile/" /></entry><entry><title>HALO 3</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/halo-3.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/halo-3.aspx</id><published>2007-09-25T23:43:12Z</published><updated>2007-09-25T23:43:12Z</updated><content type="html">Nothing else to be said. GOOCH...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/halo-3.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5129232" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>SQL Server Function to get the Hour of the Year</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-year.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-year.aspx</id><published>2007-09-25T23:32:20Z</published><updated>2007-09-25T23:32:20Z</updated><content type="html">This function returns an integer of the hour of the year passed as a variable. IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetHourOfYear]' ) 

 AND type IN (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) 

 DROP FUNCTION [util].[uf_GetHourOfYear] 

 GO 

 CREATE FUNCTION [util].[uf_GetHourOfYear]( 

 @ date DATETIME 

 ) 

 RETURNS INTEGER 

 WITH EXECUTE AS CALLER 

 AS 

 /*******************************************************************...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-year.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5129083" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="SQL Function" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Function/" /><category term="SQL Server 2008" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+2008/" /><category term="Katmai" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Katmai/" /><category term="Data Warehouse" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Data+Warehouse/" /></entry><entry><title>SQL Server Function to get the Hour of the Month</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-month.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-month.aspx</id><published>2007-09-25T23:30:06Z</published><updated>2007-09-25T23:30:06Z</updated><content type="html">This function returns an integer of the hour of the month passed as a variable. IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetHourOfMonth]' ) 

 AND type IN (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) 

 DROP FUNCTION [util].[uf_GetHourOfMonth] 

 GO 

 CREATE FUNCTION [util].[uf_GetHourOfMonth]( 

 @ date DATETIME 

 ) 

 RETURNS INTEGER 

 WITH EXECUTE AS CALLER 

 AS 

 /***************************************************************...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/25/sql-server-function-to-get-the-hour-of-the-month.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5128979" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="SQL Function" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Function/" /><category term="SQL Server 2008" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+2008/" /><category term="Data Warehouse" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/Data+Warehouse/" /></entry><entry><title>SQL Server Function to return half year number of days.</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/24/sql-server-function-to-return-half-year-number-of-days.aspx" /><id>http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/24/sql-server-function-to-return-half-year-number-of-days.aspx</id><published>2007-09-24T17:29:43Z</published><updated>2007-09-24T17:29:43Z</updated><content type="html">This function returns an integer of the number of days in the half year. &amp;#xA0; IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetHalfYearDays]' ) 

 AND type IN (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) 

 DROP FUNCTION [util].[uf_GetHalfYearDays] 

 GO 

 CREATE FUNCTION [util].[uf_GetHalfYearDays]( 

 @ date DATETIME 

 ) 

 RETURNS INTEGER 

 WITH EXECUTE AS CALLER 

 AS 

 /************************************************************...(&lt;a href="http://blogs.msdn.com/b/patrickgallucci/archive/2007/09/24/sql-server-function-to-return-half-year-number-of-days.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=5098631" width="1" height="1"&gt;</content><author><name>MSDNArchive</name><uri>http://blogs.msdn.com/MSDNArchive/ProfileUrlRedirect.ashx</uri></author><category term="sql server 2005" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/sql+server+2005/" /><category term="SQL Function" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Function/" /><category term="SQL Server 2008" scheme="http://blogs.msdn.com/b/patrickgallucci/archive/tags/SQL+Server+2008/" /></entry></feed>