Its going to be a great day!   Ready for SQL Saturday 172 in Portland today, looking forward learning lots, and sharing my CTE Presentation with those who want to learn about Common Table Expressions. Please come to my CTE if you are interested in any of the following: 1.What is a Common Table Expression 2.Simple CTE 3.CTE – Subquery …

SQL Saturday #172 in Portland Oregon Read more »

On the next two Saturdays I will be presenting the Unleashing Common Table Expressions presentation at SQL Saturday 172 in Portland Oregon, and SQL Saturday 166 in Olympia Washington. As part of refreshing the presentation I have added a few more examples of how CTE’s can be used in common practice. Using a CTE to parse a Query String. Using …

Unleashing Common Table Expressions Read more »

One thing that I end up having to look search on regularly is rounding of dates and times in Transact SQL, having looked this up too many times I finally realized that it is time for me to do my own blog post for it. First off, whats the difference between rounding and truncating in these examples. Rounding rounds to …

TSQL Rounding or Truncating DateTime to Nearest Day, Hour, Minute or Second Read more »

Coming in the next beta of the Database Health Report is a new feature called the Historic Reports which installs a small database to track database statistics over time.  This has an extremely light load on the overall database performance, and will allow you to track down details of why the database was slow at a specific point in time. …

Database Health Reports – Historic Waits Report Sneak Preview Read more »

Have you ever needed to generate a list of dates for the last 30 days.  There are lots of different ways to do this with TSQL, but one way is with a CTE, where you can then left join against it with another query to generate a list of all  dates in a result set, along with the dates for …

Recursive CTE to Calculate Dates for the Last 30 Days Read more »

There are so many cool tools available today for data visualization.   This posting covers pulling data from the AdventureWorks2012 database running on SQL Server 2012, and then using the Google Visualization tools to display geographic data. The final outcome will the this map. People in the AdventureWorks2012 database. Here is how I did it. Step 1: Create a query …

Adventureworks2012 data to Google GeoChart Visualization Read more »

I just found out that two of the sessions that I proposed for SQL Saturday #166 in Olympia next month have been accepted.  These presentations are: Exploring TSQL Enhancements in SQL Server 2012 Unleashing Common Table Expressions in SQL Server These are both presentations that I have given before and have had lots of fun with.   This should be a good …

2 Sessions Accepted for SQL Saturday 166 in Olympia Next Month. Read more »