Post image

Dates and Times in SQL Server: AT TIME ZONE

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 set to UTC by default. It is also advisable to store dates and times in UTC format on our on-premises[…]

A software architect replaces a relational database with a relational database

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. It may contain flippant remarks and editorialising. There are links to external references that may distract the reader. Last time,[…]

teacher at whiteboard

Don’t do these things in SQL Server

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 command-line utility that allows you to connect to a SQL Server (or Azure SQL Database) instance and perform database operations.[…]

Post image

Performance as a feature, software developer edition

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 feature. That’s why SQL Server (and other RDBMS products in the market) keep as much of the data in memory[…]

Dates and Times in SQL Server: DATENAME()

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 integer, DATENAME returns the part as a character string. This DATENAME function also takes two parameters: the date or time[…]

calendar

Dates and Times in SQL Server: DATEPART()

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 week we’ll go through one of them and see how it works. Introducing DATEPART, a built-in function that takes two[…]