Flagrantly ignoring the 10% rule
My friend Michael J. Swart has a rule of thumb he calls Swart’s Ten Percent Rule. If you’re using over 10% of what SQL Server restricts you to, you’re doing it wrong. After a recent… Flagrantly ignoring the 10% rule
My friend Michael J. Swart has a rule of thumb he calls Swart’s Ten Percent Rule. If you’re using over 10% of what SQL Server restricts you to, you’re doing it wrong. After a recent… Flagrantly ignoring the 10% rule
Last time we looked at adding or subtracting date parts using the DATEADD() T-SQL system function. This week we see how to calculate the difference between two date-time values using DATEDIFF() and DATEDIFF_BIG(). The syntax… Dates and Times in SQL Server: DATEDIFF() and DATEDIFF_BIG()
We are now in the home stretch of the long-running series about dates and times in SQL Server and Azure SQL Database. This week we look at one of my favourite T-SQL functions when it… Dates and Times in SQL Server: DATEADD()
Fellow Canadian Doran Douglas brought this issue to my attention recently, and I wanted to share it with you as well. Let’s say you have a file in UTF-8 format. What this means is that… Bulk insert issue with UTF-8 fixed-width file format
Continuing the series on dates and times in SQL Server and Azure SQL Database, this week we look at the hint AT TIME ZONE. In Azure SQL Database, the regional settings of the database are… Dates and Times in SQL Server: AT TIME ZONE
Content warning: This is the second (and final) rebuttal essay about why someone is wrong on the Internet. It is no doubt biased. It might go into technical detail. Parts of it may be wrong.… A software architect replaces a relational database with a relational database
Content warning: This is the first of two rebuttal essays, about why someone is wrong on the Internet. It is no doubt biased. It might go into technical detail. Parts of it may be wrong.… Relational databases aren’t the problem
A shorter post this week, but an important one. Last week, Erik Darling commented on my post saying that we shouldn’t use SELECT *, which was both amusing and accurate. Amusing, because a number of… Why you should not use SELECT *
Recently Brent Ozar posted a link to the PostgreSQL “Don’t do this” page, which I am shamelessly reproducing below, re-tailored for a SQL Server audience. Don’t use -P with sqlcmd sqlcmd is a cross-platform interactive… Don’t do these things in SQL Server
Relational database management systems (RDBMS) like SQL Server and Azure SQL Database are very good at managing normalized data. Efficient storage and retrieval of data is the name of the game, so performance is a… Performance as a feature, software developer edition
Last time we looked at DATEPART(). This post is all about the DATENAME() function. So many similarities There are many similarities between DATEPART and DATENAME. Where DATEPART returns the date or time part as an… Dates and Times in SQL Server: DATENAME()
In my previous posts in this series we’ve seen reference to Transact-SQL (T-SQL) functions that are used to get the specific part of a date and/or time (year, month, day, hour, minute, second, etc.). This… Dates and Times in SQL Server: DATEPART()
I was minding my own business innocently reading a blog post by Erik Darling, when this tip smacked me in the proverbial forehead. I even learned something that had always bothered me but had been… T-SQL aside: replace PRINT with RAISERROR
Recently I wrote a post about date and time functions you should never use, which contained an opinion I’ve expressed previously that some people have disagreed with, namely that DATETIME is a terrible data type which… Dates and Times in SQL Server: the problem with DATETIME