Programming
Exporting VARCHAR MAX and NVARCHAR MAX to CSV

Exporting VARCHAR MAX and NVARCHAR MAX to CSV

Recently, I had to export some query results to CSV and Excel. One of the columns was extremely large query text which was defined as NVARCHAR(MAX). Here are some of the issues I faced with this request and how I over came them. Initial setup and thought process The request was to pull query text...
When Excel will not convert a date to a date

When Excel will not convert a date to a date

While working with several CSV files, I found myself in a strange situation. I had merged the file contents into a single CSV file. I then opened the file in Excel, only to find that the Date column had data that was a mix of YYYY-MM-DD and MM/DD/YYYY. There are several things that can cause...
Useful SQL Server Date Formats

Useful SQL Server Date Formats

Here are a few date formats that I’ve found useful over the years. These all come from getdate() and are changed by using COVERT or FORMAT commands. I’ve chosen a few of the date formats I’ve used the most: YYYY-MM-dd YYYY-MM-dd HH:mm YYYYMMdd YYYYMMdd_HHmm You can take the results from the commands and assign them...
Finding the SSRS Log File

Finding the SSRS Log File

Discover how to find and examine the SQL Server Reporting Services log file.
T-SQL Tuesday March 2019 – Dipping into the Cookie Jar

T-SQL Tuesday March 2019 – Dipping into the Cookie Jar

This month's TSQL Tuesday is hosted by Shane O’Neill (B/T). The challenge this month is to write about "Dipping back into the cookie jar" or using the memories of a past challenge or accomplishment to help you through a new issue.
T-SQL Tuesday July 2018 - Working with Dates

T-SQL Tuesday July 2018 – Working with Dates

This snippet is so nice, I’m posting it again! I’ve utilized the script below at least once a week, for either reports, or working with large data sets. Rather than reinventing the wheel, I’m posting my code here and to GitHub for everyone to see. The script expects two date parameters, a start date and...
Generate fresh data for WideWorldImporters

Generate fresh data for WideWorldImporters

See how to use built in stored procedures to grow the WorldWideImporters SQL Server database with new, current data.
Loop over dates in SQL Server

Loop over dates in SQL Server

I’ve written the script below at least once a month, for either reports, or working with large data sets. Rather than reinventing the wheel, I’m posting my code here and to GitHub for everyone to see. The script expects two date parameters, a start date and an overall end date. The script will then assign...
Stored Procedure Results in an SSIS Message Box

Stored Procedure Results in an SSIS Message Box

I was recently asked if it is possible to display the results of a query / stored procedure in an SSIS Message box. The answer is Yes, with a bit of C#.
Recover the missing Report Data tab in SSRS

Recover the missing Report Data tab in SSRS

Learn how to recover the Report Data tab in SQL Server Reporting Services (SSRS)
View SSIS Variables via Message Box

View SSIS Variables via Message Box

You can use a VB or C# message box to view the current value of a variable. No more guessing!
Training Links

Training Links

At work, we are approved for 2 training classes per year. Here is a list of SQL Server training classes that I’ve found, aside the the popular ones everyone knows about: Global Knowledge Quick Start – 2014 Quick Start – 2012 Solid Q Benchmark Learning I do not get paid for these links. I am...