intellectually constipated

patrick gallucci's technology brain drain

Browse by Tags

Tagged Content List
  • Blog Post: How to drop all tables, all views, and all stored procedures from a SQL 2005 DB...

    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.   create procedure usp_DropSPFunctionsViews as   -- variable to object name declare @name varchar...
  • Blog Post: The few, the proud, the fortunate. Microsoft Certified Architect Program

    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...
  • Blog Post: SQL Server Function to merge a date with a time

    I use this when I need to join two fields. One has a date, the other has a time.   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 ...
  • Blog Post: SQL Server Function to get the Hour of the Year

    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...
  • Blog Post: SQL Server Function to get the Hour of the Month

    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 ...
  • Blog Post: SQL Server Function to return half year number of days.

    This function returns an integer of the number of days in the half year.   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 ...
  • Blog Post: SQLCMD and the power of the little r

    I would have to say that one of my favorite new utilities that shipped with SQL Server 2005 has been the SQLCMD utility . I am going to demonstrate the use of include files. The following is the complete call syntax for SQLCMD. sqlcmd [{ { -U login_id [ -P password ] } | –E trusted connection }] [ -z...
  • Blog Post: SQL Server Data Types Test Tables

    These tables can be used for testing various data types of SQL Server. You can extend as needed. SET NUMERIC_ROUNDABORT OFF ; SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT,QUOTED_IDENTIFIER, ANSI_NULLS ON ; GO -- Create XML Schema Collection CREATE XML SCHEMA COLLECTION PartitionMapSchema...
  • Blog Post: Column Information View for SQL Server

    Here is a view that contains column information. This is useful if you need to create a DDL statement for a table. CREATE VIEW dbo.vColumnInfo AS SELECT tbl.name AS [Table_Name], SCHEMA_NAME(tbl.schema_id) AS [Table_Schema], CAST (ISNULL(cik.index_column_id , 0) AS BIT ) AS [InPrimaryKey], CAST (ISNULL...
  • Blog Post: Released - Cumulative update package 3 for SQL Server 2005 Service Pack 2

    Here is the link. http://support.microsoft.com/default.aspx/kb/939537 Here are the fixes in this release. SQL bug number KB article number Description 50001581 938243 (http://support.microsoft.com/kb/938243/) FIX: Error message when you run a full-text query against a catalog in SQL Server 2005: “The...
  • Blog Post: Generate BCP, Bulk Insert code with TSQL

    This script will generate tsql code to bcp and bulk load data for all tables in a given DB. SET NOCOUNT ON GO DECLARE @ path nvarchar(2000), @batchsize nvarchar(40), @format nvarchar(40), @serverinstance nvarchar(200), @security nvarchar(800) SET @ path = 'C:\Temp\' ; SET @batchsize = '1000000' -- COMMIT...
  • Blog Post: CA Erwin and Microsoft's Visual Studio Team Edition for Database Professionals

    This about sums it up! The integration of CA's ERwin® Data Modeler with Microsoft's Visual Studio Team Edition for Database Professionals brings together an industry-leading heterogeneous database design product with a focused MS SQL Server development and life cycle management environment to provide...
  • Blog Post: SQL Server Function to Return DateName

    This function will return the date name for a given date time. 1: USE [DW_SharedDimensions]; 2: GO 3: IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetDateName]' ) AND type in (N 'FN' , N 'IF' , N 'TF' , N 'FS' , N 'FT' )) 4: DROP FUNCTION [util].[uf_GetDateName] 5:...
  • Blog Post: SQL Server Function to Return Date from Numeric Value

    This function will return a datetime for a numeric value. This is using the 1900 date system, the same as used by Excel. See http://office.microsoft.com/en-us/excel/HP100791811033.aspx for more examples. 1: IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N '[util].[uf_GetDateFromNumeric...
  • Blog Post: SQL Server Function to Return Numeric Value for DateTime

    Technorati Tags: SQL Server , SQL , Function , Intellectually Constipated This function will return a numeric value for a given date. This is using the 1900 date system, the same as used by Excel. See http://office.microsoft.com/en-us/excel/HP100791811033.aspx for more examples. 1: 2: IF EXISTS ( SELECT...
  • Blog Post: SQL Server 2005 Derived Tables, Common Table Expressions and Indexed Views Query Processing Part III

    So in Part II of this article I had created a View so that I could then create an index on this view to see if that was going to give me the expected results. I did create the view, but not the index. So you probably already know. These columns are non-deterministic and as a result the create index statement...
  • Blog Post: SQL Server 2005 Derived Tables, Common Table Expressions and Indexed Views Query Processing Part I

    I am calling this Part I because I know I still have some more details to discover about something I learned today. Not sure I fully understand it right now, but by the time I get to Part N, I am confident I will know way to much about the subject. I am not going to spill all the details out right now...
  • Blog Post: Visual Studio Team Edition for Database Professionals.

    Today we anounced Visual Studio 2005 Team Edition for Database Professionals "Visual Studio Team Edition for Database Professionals delivers a market-shifting database development product designed to manage database change, improve software quality through database testing and bring the benefits of...
  • Blog Post: Why am I Intellectually Constipated?

    Even though it is a great time to be a technologeist, this list is the reason why I am IC, with no cure or remedy in site. 1. Windows Vista Beta 2. Speech Server 2007 Beta 3. Commerce Server 2007 Beta 4. Exchange Server 12 Beta 5. Microsoft Windows Compute Cluster Server 2003 Beta 6. Office 12 Beta...
  • Blog Post: Windows Vista Beta 2 - HUH?

    After getting a taste of the things to come in Windows Vista, by loading IE7 and the new Windows Media Player 11, I took the leap and rebuilt my laptop with the 5381 Beta 2 build. I was a little worried that I was going to have to ghost my machine back to XP, but after 3 days now, I am happy to report...
  • Blog Post: Colorado PASS Camp 2006 – SQL Server Technology Summit

    First I want to thank everyone who attended the Colorado PASS Camp 2006 in Denver and my session this week. After we got past the technical issues, it was fast a furious as I tried to get to everything I wanted to show. Here is the link to the lab I presented and the PowerPoint slide deck as well. ...
  • Blog Post: SQL Intellisense® style word completion for MS Query Analyzer, VS.NET 2003, SQL Server Management Studio and VS 2005.

    I think that title says it all. The tool is still in beta and needs to be sharpened up a little, but this is one thing that I was hoping would have made it into the Yukon\Whidbey Product line... http://www.sqlprompt.com/ Don't judge it to quick right now. Red-Gate just aquired the tool and I...
  • Blog Post: pdc 2005

    i have posted an article on developer.com about my take on the pdc this year. i just recorded general impressions of the new technologies that are coming out of redmond this year and next year. i can not remeber a time, if it has even happened, when MS has delivered so many products. having been around...
Page 1 of 1 (23 items)