Demystifying the use of CASE in an ORDER BY statement
Chuck Hoffman exposes the mysteries of getting CASE statements to work in dynamic ORDER BY statements.
2015-06-05 (first published: 2012-04-26)
26,158 reads
Chuck Hoffman exposes the mysteries of getting CASE statements to work in dynamic ORDER BY statements.
2015-06-05 (first published: 2012-04-26)
26,158 reads
Chuck Hoffman shows a technique using sets for selecting records from hierarchies such as Manager / Employee structures.
2012-05-03
9,641 reads
Are multiple binary switches becoming hard to manage? The TestBits function can help with that.
2012-04-09
4,215 reads
By Vinay Thakur
As this is an Artificial Intelligence (AI) World, things are changing. We can see that...
In a containerized app, React and Chakra UI provide a robust and accessible user...
By Steve Jones
nachlophobia – n. the fear that your deepest connections with people are ultimately pretty...
hi, I have a table called Rules Create table Rules ( Id int ,...
I am currently upgrading a very old database running SQL Server 2008 to SQL...
Hi Team, I am planning to apply security updates for SQL Server 2016 on...
What is returned from this query?
SELECT ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2011' AND soh.OrderDate < '01/01/2012') AS OrdersIn2000 , ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2012' AND soh.OrderDate < '01/01/2013') AS OrdersIn2001 , ( SELECT COUNT (*) FROM Sales.SalesOrderHeader AS soh WHERE soh.OrderDate > '01/01/2013' AND soh.OrderDate < '01/01/2014') AS OrdersIn2002;See possible answers