2019-07-09 (first published: 2019-05-01)
931 reads
2019-07-09 (first published: 2019-05-01)
931 reads
This Script will read the Estimated Time for recovery from Error Log
2019-07-08 (first published: 2019-06-26)
710 reads
You find you are querying a vendor supported database where you're not allowed to make any collation changes, and which has a weird collation setup: default DB collation that matches your server and other databases all character related columns are explicitly a different collation that does not match your DB or server collation Rather than […]
2019-07-05 (first published: 2019-06-26)
4,428 reads
Security is probably one of a production DBA's most important tasks and if developers use application or service accounts to run queries in your production environment you need to identify then and prohibit it. I notice some unwanted activity after staring a new job and decided to create a script that notifies me via email when […]
2019-07-04 (first published: 2019-06-26)
2,269 reads
A stored procedure that produces a MERGE statement for a given table containing a VALUES clause for all rows, useful for migrating static data between environments.
2019-06-03 (first published: 2012-03-14)
7,980 reads
Alter database owner to SA from any other user details against all user databases
2019-05-03 (first published: 2015-01-13)
1,876 reads
The script helps to calculate the size of the backup of the databases monthwise. This will help to understand the database growth rate from the backup file if we do not have any data collection utility to find the exact details of the DATA File growth.
2019-05-03 (first published: 2012-08-20)
1,625 reads
-- Backup Growth Trend Check To Understand how much disk space you need in future
2019-05-03 (first published: 2015-06-02)
1,289 reads
Creates a record of all or part of a Windows PowerShell session in a text file.
2019-05-03 (first published: 2015-09-17)
1,137 reads
If you have any requirement to extract next 100 sequential date from a present date, you can use the below script. You can change the @datetimeformat value and the output will appear in the same format.
2019-05-03 (first published: 2016-09-26)
516 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 SQL Server Still Wins
Comments posted to this topic are about the item DBCC CHECKDB Limits I
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