Learn where SQL Server Profiler saves your Templates. Continue reading Find your SQL Server Profiler Template Path
Learn how to add a date printed and a page count in the footer of your SSRS report. Even if you have errors with Globals!OverallTotalPages. Continue reading Display a Page Count in SSRS
We are all familiar with seeing our data in a vertical format from SSMS. Here is a sample:
But what if you, or your customer want’s the data horizontally? That is easy enough with a CTE. Continue reading “Display results Horizontally in SQL Server”
Recently, I had to pull customer numbers out of strings from an excel sheet. Sure, you can use trickery like spaces to columns or regex. Excel is pretty powerful, if you know all of the text tools at your disposal. This is how I extracted the numbers for random text
I recently had to use back end data from SQL Server to deliver several reports in excel. All of my SQL code gave me results in seconds; however, the users had distinct formatting requests. I would have to use a few excel tricks to get things just right in each report.
Continue reading “Working with Seconds in Excel”
Sometimes you just need hh:mm:ss
I ran into a case when I needed to display some results in the HH:MM:SS format. We all know and love DATEDIFF, which gives you whole number results. Using DATEDIFF, I was getting results like this:
-- Declare some variables for the requested timeframe
DECLARE @START_DATE DATETIME
DECLARE @END_DATE DATETIME-- Set the timeframe variables
SET @START_DATE = '2011-01-01 16:00:00'
SET @END_DATE = '2011-01-01 22:47:22'
SELECT DATEDIFF(second,@Start_date, @END_DATE) AS Segundos
(1 row(s) affected)
If you’re like me, you like using descriptive variable, procedure and function names. Along with those, descriptive transaction names are great, so you know exactly what type of havoc you were throwing at SQL Server. But, if you’re too descriptive, … Continue reading Long TRANSACTION Identifier is Long