Most recent posts

Multiple CTEs in One Query 0

Multiple CTEs in One Query

CTEs are a great thing to use in your query.  They are an excellent way to consolidate code and make it readable as well as create a “view” inside of your code.  One great thing I have used them for...

Pre-Compiled Script Task Error in SSIS 2005 0

Pre-Compiled Script Task Error in SSIS 2005

There is an issue with script tasks in SSIS 2005 that could come up occasionally.  It is generally an issue that shows up in a 64-bit environment where the script can’t be pre-compiled.  The error that will show up states that “The...

0

Script Indexes With Your Tables

Scripting tables inside of SQL Server Management Studio is a very simple task.  Just right click and select script table.  The problem is that, but default, the indexes on a table are not part of the script.  Rather than scripting...

Select NULL AS Max or Min in SQL Query 4

Select NULL AS Max or Min in SQL Query

By default the functions MAX and MIN do not count NULL in their evaluation of your data.  If we have a column containing only dates for instance and there is a NULL date, MAX and MIN will both ignore that...

Capture SSIS Package Execution Status 1

Capture SSIS Package Execution Status

Executing an SSIS package from within a stored procedure is not an uncommon request.  People sometimes scratch their head when it comes to figuring out if that package ran successfully or not though.  There may be a process that runs a stored...

Truncating A Replicated Table 1

Truncating A Replicated Table

On a recent project that I was working on we came across an issue where we needed to replicate several databases on a new server.  Much of the ETL had places where tables were truncated and reloaded.  Normally this is...

CREATE SCHEMA Syntax Error 0

CREATE SCHEMA Syntax Error

Recently while creating a script to migrate the new holding tables over to the stage and production machines I ran into a little issue.  The holding table we are using in this case houses several different sets of data for...

Comma Delimited List with COALESCE 0

Comma Delimited List with COALESCE

There may be a day when you need to create your own comma delimited list from data contained in a SQL table.  Sure you could build a cursor and go through each row adding a comma after each record.  The...

7

Server ‘SERVERNAME’ is not configured for RPC

I recently was doing some development on my local machine and needed to pull data from a linked server.  I set up the linked server and everything was working great.  Executing queries to pull the data to my machine was...