How can I use the identity column, without knowing identity column’s name.
One of the most fun parts of blogging is when you learn something completely unexpected while writing a blog. The ... Continue reading
2022-05-12
16 reads
One of the most fun parts of blogging is when you learn something completely unexpected while writing a blog. The ... Continue reading
2022-05-12
16 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-05-11
20 reads
For the longest time, we didn’t have one of the most useful tools for monitoring SQL Server behavior, but I just found out that, indeed, you can use Extended...
2022-05-11 (first published: 2022-05-02)
194 reads
Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers. I wrote a SQL New Blogger post recently...
2022-05-11
54 reads
Imagine that we’re seeing very heavy load on our SQL server, be it CPU or IO and we need to find out which database is the driver. I’m sure...
2022-05-11 (first published: 2022-05-03)
1,134 reads
How long has this worked, and why didn’t anyone tell me? A typical restore statement from a FULL backup and a LOG backup: USE [master] RESTORE DATABASE [XE_demo] FROM...
2022-05-11
49 reads
T-SQL Tuesday is a monthly blog party hosted by a different community member each month, and this month Kenneth Fisher (blog | twitter) asks us to talk about our...
2022-05-11
11 reads
I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m...
2022-05-10
17 reads
Is this thing on? If you’re reading this test post, it means DNS has updated properly and I’ve successfully migrated to Azure Static Web Sites. Welcome!
2022-05-10
16 reads
It’s that time of the month again for a T-SQL Tuesday blog party. This month is hosted by Kenneth Fisher, who has hosted a few times in the past....
2022-05-10
59 reads
By Steve Jones
I type fairly well. Well, I type fast, but I do wear out a...
By way of background, a while back I did video called “My New Favourite...
By ReviewMyDB
Index maintenance has always meant nightly jobs and a window you have to defend....
Comments posted to this topic are about the item SQL Art, Part 4: Happy...
Comments posted to this topic are about the item How We Handled a Vendor...
Comments posted to this topic are about the item Cognitive Coverage
I have this data in the dbo.Commission table in a SQL Server 2022 database.
salesperson commission Brian 12 Brian 16 Andy 7 Andy 14 Andy 21 Steve 20 Steve NULLAll the data is a varchar, and I decide to run this query to get the totals for each salesperson.
SELECT SalesPerson
, AVG(TRY_PARSE(Commission AS int)) AS TotalCommission
FROM commission
GROUP BY SalesPerson
GO
What average commission is calculated for Steve? See possible answers