Query DB2 From PowerShell
Story time: A few months ago I was in a meeting where we were all asked how we could take on a complex, but very necessary task. As they...
2021-02-17 (first published: 2021-02-09)
611 reads
Story time: A few months ago I was in a meeting where we were all asked how we could take on a complex, but very necessary task. As they...
2021-02-17 (first published: 2021-02-09)
611 reads
For most of us in the Northern Hemisphere the clocks go foward next month and we get to look forward to longer, sunnier evenings. This post is a reminder...
2021-02-17 (first published: 2021-02-10)
461 reads
When you are making changes to an existing Non-Clustered index SQL Server provides a wide variety of options. One of the more frequently used methods is DROP EXISTING; in...
2021-02-17
29 reads
For the past year Microsoft have said that Generation 4 hardware is soon coming to its end of life. I know many installations that have used Generation 4 over...
2021-02-16
954 reads
This is one way to create a polling loop in PowerShell. I’m sure there are several options, but this one works well for the use case. Backstory I needed...
2021-02-16
20 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...
2021-02-16
19 reads
The two latest trends in emerging data platform architectures are the Data Lakehouse (the subject of my last blog Data Lakehouse defined), and the Data Mesh, the subject of...
2021-02-16
12 reads
Having up to date statistics is vital for getting the best performance out of your queries. Even though SQL Server automatically updates statistics in the background for you, you...
2021-02-16
229 reads
I am working on an Azure SQL Database migration from an on-premises VM, and at the client's request I am working through the BACPAC Import/Export process rather than using...
2021-02-16 (first published: 2021-02-08)
343 reads
This is a post that looks at how to compare data changes in recent data. A customer recently asked me about looking at a table, and choosing specific data...
2021-02-16 (first published: 2021-02-08)
286 reads
By ReviewMyDB
Index maintenance has always meant nightly jobs and a window you have to defend....
I’m sure you’ve all heard the tale of Goldilocks and the Three Bears, but...
By Steve Jones
One of the things I’ve been requesting for a number of years is cost...
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