sys.sql_modules vs. INFORMATION_SCHEMA.Routines
Consider the following two queries meant to search for a keyword in SQL programmability objects.
select s.name +'.' + o.name, o.type_desc, m.definition
from sys.sql_modules...
2012-04-18
1,960 reads
Consider the following two queries meant to search for a keyword in SQL programmability objects.
select s.name +'.' + o.name, o.type_desc, m.definition
from sys.sql_modules...
2012-04-18
1,960 reads
If you have an 11th generation Dell PowerEdge R810 , PowerEdge R910 server, or a PowerEdge M910 blade server, there is...
2012-04-18
2,152 reads
In our blog post last week: Instance Wide Wait Stats we promised to show You how to visualize the collected...
2012-04-18
1,167 reads
IIF() function is new to SQL Server family of functions. It is a brand new logical function being introduced with...
2012-04-18
232 reads
I saw this question in one of forums on backing up i.e. scripting out a database object. The problem is...
2012-04-17
1,801 reads
As part of a project I’m currently involved with, we’re migrating a database to SQL Server 2008 and performing some...
2012-04-17 (first published: 2012-04-12)
2,794 reads
American Icon: Alan Mulally and the Fight to Save Ford Motor Company ($18 at Amazon) was a good read, with...
2012-04-17
756 reads
In part five of this on going series about choosing the right reporting tool we will discuss the newest of...
2012-04-17
1,616 reads
All ColoradoSQL user group meetings start at 5:30 p.m. and provide food and refreshments. There is no cost to attend...
2012-04-17
833 reads
I spotted a new task in SSIS 2012 – Execute T-SQL Statement Task. It executes T-SQL statements, only Transact-SQL statements against...
2012-04-17
1,163 reads
How can you achieve good enough without compromising the process/product? In the world of...
By Patrick
One of my customers recently wanted to rename each of the SQL audit files...
The post The pros and cons of self-service BI: What every industry leader should...
Comments posted to this topic are about the item What's New for the Microsoft...
Comments posted to this topic are about the item Using Outer Joins
I have this data in a SQL Server 2019 database:
Customer table CustomerID CustomerName 1 Steve 2 Andy 3 Brian 4 Allen 5 Devin 6 Sally OrderHeader table OrderID CustomerID OrderDate 1 1 2024-02-01 2 1 2024-03-01 3 3 2024-04-01 4 4 2024-05-01 6 4 2024-05-01 7 3 2024-06-07 8 2 2024-04-07I want a list of all customers and their order counts for a period of time, including zero orders. If I run this query, how many rows are returned?
SELECT c.CustomerName, COUNT(oh.OrderID) FROM dbo.Customer AS c LEFT JOIN dbo.OrderHeader AS oh ON oh.CustomerID = c.CustomerID WHERE oh.Orderdate > '2024/04/01' GROUP BY c.CustomerNameSee possible answers