T-SQL Advice For Young, Old, and even Eccentric
Be mindful of advice. Give an ear to those offering it. Just be mindful, there is no need to accept the advice, but it is wise to at least...
2022-04-22 (first published: 2022-04-12)
833 reads
Be mindful of advice. Give an ear to those offering it. Just be mindful, there is no need to accept the advice, but it is wise to at least...
2022-04-22 (first published: 2022-04-12)
833 reads
Checkpoints are essential in SQL Server to help with the durability and reliability of data persisted in the database. When done right, you barely even notice them and performance...
2022-02-02 (first published: 2022-01-14)
489 reads
Bulk insert can be an extremely helpful tool to help ingest data into SQL Server efficiently. Sometimes, it is necessary to capture metrics in regards to the bulk insert...
2022-01-24 (first published: 2022-01-07)
750 reads
Every Database has a DBO or database owner set. Sometimes the owner is invalid, while most of the time the DBO is perfectly normal. It is easy to ignore...
2022-01-17 (first published: 2022-01-05)
656 reads
Source control is quintessential to a productive development environment. A well maintained and organized source control system is akin to having known-good database backups. Having the right tools to...
2022-01-02
42 reads
This is a very simple introduction into the creation of an Extended Event session using a template for Azure SQL DB. I demonstrate the use of the GUI to...
2022-01-02
46 reads
Excessive memory grants are extremely problematic in SQL Server. These excessive grants do not just happen out of the blue. Memory grants are directly linked to the queries.
The post...
2022-01-01
92 reads
Having a Database Owner is not something that most people think about until something breaks. Usually, people will just kind of ignore it because it is just so innocuous...
2022-01-14 (first published: 2021-12-31)
337 reads
Excessive memory grants are extremely problematic in SQL Server. These excessive grants do not just happen out of the blue. Memory grants are directly linked to the queries.
The post...
2021-12-31
259 reads
Queries will fail. That is as inevitable as death and taxes. This article demonstrates how to find some truly horrible queries.
The post Queries that Fail and How to find...
2021-12-29
115 reads
By Steve Jones
I had mentioned some new T-SQL functions for SQL Server 2022 and a commenter...
This post comes off the back of my last, where I looked at issues...
By Vinay Thakur
As this is an Artificial Intelligence (AI) World, things are changing. We can see that...
A while into install I get a Microsoft OLE DB Driver for SQL Server....
Comments posted to this topic are about the item More Funny SELECTs
Comments posted to this topic are about the item Reducing the Cycle Time
What does this code return?
SELECT ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2011' AND soh.OrderDate < '01/01/2012') AS OrdersIn2000 , ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2012' AND soh.OrderDate < '01/01/2013') AS OrdersIn2001 , ( SELECT COUNT (*), MAX(soh.OrderDate) AS latestorder FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2013' AND soh.OrderDate < '01/01/2014') AS OrdersIn2002; GOSee possible answers