Archives

How to Pass GetDate() as a Stored Procedure Parameter

The Problem

When you pass GetDate() as a parameter to a stored procedure, the following error is returned:

EXEC dbo.ProcDate GetDate()

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near ‘)’

When I ran into this problem, I found this helpful article which suggests that I should assign the value of GetDate() to variable and then pass […]

How to Ask for Help

Like many other technical bloggers, I receive requests for help on a regular basis. Since I’m constantly learning and evolving I approach others for help as well. A couple of years ago, I received an email from a new reader which began with:

Always two there are, no more, no less: a master and an […]

Un-SQL Friday: Bad Interviews

I haven’t been participating in many of these blog memes because I have been so busy lately. A lot of my time was occupied with job hunting and since I just finished a series of interviews with different companies, this meme is perfectly timed. My good friend Jen McCown (Blog/Twitter), the fairer half of the […]

Creating a Date Table/Dimension on SQL 2008.

In a previous article, I listed the benefits of using a dedicated date table and included a customizable script which enables you to quickly create your own version. One of my readers pointed out that he uses the date datatype, rather than using the smart integer key method, when working with SQL 2008+ databases. The […]

SQL Rally 2012 is Coming to Big D!

Last week PASS announced that Dallas and the North Texas SQL Server User Group have been awarded SQLRally 2012. This is great news for all of the nearby PASS User Groups and DBA’s.

We’ve put on three successful SQL Saturday events in 18 months, and I’m proud to have been on the planning […]

Date vs Integer Datatypes as Primary Key for Date Dimensions

Every Kimball Group book I’ve read, as well as every Data Warehouse class I’ve attended, has indicated that a Date Dimension Primary Key should be a smart integer key in the format YYYYMMDD (20110518) so I’ve always built my Date tables that way. However, Barnaby (Blog/Twitter) pointed out that I should be using a Date […]

Come See Me Present Wednesday at the Fort Worth SSUG.

This Wednesday I’ll be presenting at the Fort Worth SQL Server User Group. Come see me present:

Data Warehousing – How to Convince “The Bobs”

I got a meeting with the Bobs in a couple of minutes…

Building your first Data Warehouse is a long, and often difficult process. How can you get your boss to […]

Using a Date Table to Track Custom Fiscal Years/Periods

Calendar Tables are only useful if they reflect how your company evaluates its data. Therefore, any company using non-standard financial fiscal years and periods will require customization with their Calendar or Date Table. In this post, I’ll provide an example of how to do so using the M2M ERP System Database. For those who don’t […]

Calendar Tables - Why You Need One.

*** Note: The code below is for use with SQL 2005 and previous versions. I have written new code to take advantage of the Date Datatype in SQL 2008 and above which can be found here.

What is a Date (Calendar) Table?

For the purposes of this article a Date Table is a dedicated table containing a […]

SQL Saturday Dallas Reflections

SQL Saturday Dallas, which was our third, went off without a hitch. While there were a few items we’ve identified as needing work, overall the event was swimmingly successful.

Kevin Kline – Troubleshooting and Performance Tuning Microsoft SQLServer with Dynamic Management Views (DMVs)

The festivities started on Friday with our three Pre-Con events. Kevin […]