Author Archives: MikeDavisSQL

Two Digit Dates in SQL – MM/DD/YYYY

When creating dates or numbers as strings it is sometimes required to have two digit numbers. For example, instead of this: 3/1/2011 You want to see this: 03/01/2011 There is an easy way to do this using the Right() function … Continue reading

Posted in Syndication, T-SQL | Tagged | Leave a comment

SSRS Top N and Bottom N reporting with Duplicates

Previously I wrote a blog on Top N and Bottom N reporting. There were a couple of gotcha I did not cover in that blog so I thought I would cover those here to answer some of the questions I … Continue reading

Posted in SSRS, Syndication | Tagged | 2 Comments

Standard Deviations with CTE in SQL

I was working with a client recently getting the number of standard deviations a student was off the average number of suspensions. I accomplished this with two Common Table Expressions, (CTE). The first CTE gets the standard deviation and the … Continue reading

Posted in Syndication, T-SQL | Tagged | Leave a comment

SSRS Report Models no Primary Keys

When creating report models you might run into bad database designs where the tables have no foreign keys and/or no primary keys. This can be resolved in the report model DSV. I have created two tables, one with first names, … Continue reading

Posted in SSRS | Tagged | Leave a comment

SSRS – Creating Drill Through reports with MDX

If you are reporting from a Cube in SSRS and you want to drill through to another report you can set up actions just like any other drill through except one small change. The parameter you pass to the drill … Continue reading

Posted in mdx, SSAS, Syndication | Tagged , | 2 Comments

SSIS – Using Kill with SP_Who to Break locks

The dreaded table lock can occur and cause your SSIS packages to fail. A popular request I receive asks “How can I get rid of these table locks?” This blog will show you how to build a package that will … Continue reading

Posted in SSIS, Syndication | Tagged | 2 Comments

SSAS Trending KPI

KPI’s (Key Performance Indicators) in Analysis Services are a great way to show visually if a measure is trending in right direction based on previous levels. If you want to show a measure has increased or decreased since last month, … Continue reading

Posted in SSAS, Syndication | Tagged | Leave a comment