Tag Archives: T-SQL

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

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

Comparing Previous Rows in SQL

I had a client recently that needed me to get the direction a student’s GPA was headed on a regular basis. To do this I needed to get the last GPA record on the table and the previous GPA. The … Continue reading

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

Sorting a String as a Number with T-SQL and SSIS

I was working on a Cube in Analysis Services for a client recently and needed to sort on a field that was a varchar but contained numeric data. I wanted to sort as if it was numeric. I could not … Continue reading

Posted in SSIS, Syndication, T-SQL | Tagged , | 2 Comments

SQL PASS Summit 2011 The Aftermath

I just returned from Seattle, WA and my first time speaking at SQL PASS Summit. I did the SQL Smackdown T-SQL vs SSIS Loading a Data Warehouse with Adam Jorgensen. The session was a hit, it was standing room only … Continue reading

Posted in PASS, SSIS | Tagged , , , | Leave a comment