T-SQL Programming Drupal Grupal in T-SQL Programming Alternatives To SQL Server 2022 Built-in function GREATEST If you haven’t already heard, SQL Server 2022 introduced a new built-in system function called GREATEST. Simply put, it is... 18 September 2023 14 min read
Blogs Louis Davidson in Blogs Yet Another Reason to Not Use sp_ in SQL Server Object Names In 2012, Aaron Bertrand said most everything I knew (and a bit more) about the issues with using the sp_... 25 August 2023 6 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Working around schema drift in SQL Server At Stack Overflow, our environment has multiple implementations of a largely – but not 100% – identical schema. (By “schema,”... 14 August 2023 10 min read
T-SQL Programming Greg Larsen in T-SQL Programming Using a Subquery in a SELECT statement Did you know you can include a SELECT statement within another SELECT statement? When a SELECT statement is embedded within... 26 June 2023 15 min read
T-SQL Programming Itzik Ben-Gan in T-SQL Programming T-SQL Gap-Filling Challenge A student of mine sent me a T-SQL challenge involving gap-filling of missing dates and balances. I found the challenge... 29 May 2023 19 min read
Blogs Ben Johnston in Blogs Unmasking SQL Server Dynamic Data Masking – Part 1 – Introduction This is the beginning of a series on SQL Server Dynamic Data Masking. Dynamic Data Masking is a concept familiar... 26 May 2023 12 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Changing log growth strategy in SQL Server 2022 When I first saw a bullet item stating SQL Server 2022 would support instant file initialization for log file growth,... 15 May 2023 6 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming One use case for NOT using schema prefixes I’ve long been a huge advocate for always referencing objects with a schema prefix in SQL Server.… 20 April 2023 6 min read
T-SQL Programming Edward Pollack in T-SQL Programming Ordered Columnstore Indexes in SQL Server 2022 One of the more challenging technical details of columnstore indexes that regularly gets attention is the need for data to... 07 April 2023 17 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming GENERATE_SERIES: My new go-to to build sets I have come across a lot of use cases for manufacturing rows on the fly, aside from the common goal... 30 March 2023 12 min read
T-SQL Programming Greg Larsen in T-SQL Programming Paging Data in T-SQL Sometimes when working with very large sets of data, you may not want to return all of the data at... 20 March 2023 10 min read
T-SQL Programming Louis Davidson in T-SQL Programming Optional Code in T-SQL Scripts using SQLCMD When you are writing T-SQL scripts to save away, for example one to create a new database, there are often... 06 March 2023 6 min read
T-SQL Programming Aaron Bertrand in T-SQL Programming Find 40 Problems in this SQL Server Stored Procedure I’ve been at this for a while now, and have a very particular set of rules and coding conventions that... 23 February 2023 21 min read
Learn SQL Server Greg Larsen in Learn SQL Server Using TOP clause in a SELECT statement There might be a time when you might want to return just a few rows of a result set, instead... 06 February 2023 11 min read
Blogs Louis Davidson in Blogs Dealing with the Bits of a Binary Value in SQL Server In this article, I want to talk about a topic that you may never need. The only time I have... 04 December 2022 5 min read
T-SQL Programming Edward Pollack in T-SQL Programming Converting Data Across Time Zones: An In-Depth Primer If only the entire world used UTC, wouldn’t life be so much easier? We can dream, can’t we? While some... 21 November 2022 27 min read
Learn SQL Server Greg Larsen in Learn SQL Server The Basics of Deleting Data from a SQL Server Table Over time data in SQL Server tables needs to be modified. There are two major different aspects of modifying data:... 07 November 2022 12 min read
Learn SQL Server Greg Larsen in Learn SQL Server The Basics of Updating Data in a SQL Server Table Once data is inserted into a table, data typically needs to be maintained as time goes on. To make changes... 21 October 2022 14 min read
Blogs Louis Davidson in Blogs Generating Repeatable Sets Of Test Rows In order to test graph structures, I needed a large set of random data. In some ways, this data will... 30 September 2022 11 min read
T-SQL Programming Greg Larsen in T-SQL Programming Summarizing data using GROUP BY and HAVING clauses You can summarize data to get counts, averages, sums, and more using GROUP BY in T-SQL queries. Greg Larsen shows... 27 May 2022 11 min read