SQL 2008 MERGE using Dynamic SQL over a Linked Server
Stored Procedure to build a MERGE statement in SQL 2008 using dynamic SQL.
2010-05-31 (first published: 2009-04-06)
2,499 reads
Stored Procedure to build a MERGE statement in SQL 2008 using dynamic SQL.
2010-05-31 (first published: 2009-04-06)
2,499 reads
Given some input parameters, it generates the filegroups, files, partition function and partition scheme sql statements.
2010-05-28 (first published: 2009-04-17)
1,488 reads
This scripts helps to power you with the disk space monitoring for the Mount points.
Hope this helps
2010-05-27 (first published: 2009-04-17)
4,015 reads
The stored procedure sp_DropDatabaseObject is designed to easily drop a variety of database objects with extensive feedback to the user
2010-05-26 (first published: 2009-04-21)
1,515 reads
Reports all running requests along with the request's identifying information (SPID, login etc), current resource consumption, query batch text, statement text, and XML query plan.
2010-05-24 (first published: 2009-05-01)
5,357 reads
An alternative to the SSIS approach to maintaining an RSExecutionLog database for Reporting Services supplied by Microsoft
2010-05-21 (first published: 2009-05-07)
2,254 reads
Modified version of a script that can be found at http://www.sqlservercentral.com/Contributions/InstallEditor
2010-05-20 (first published: 2009-05-07)
3,918 reads
This script will generate a format friendly ddl statement for a predefined table in sql server.
2010-05-19 (first published: 2009-06-03)
1,960 reads
This script combines sp_who2 and sp_lock to get meaning full info that includes host Ip address
2010-05-17 (first published: 2009-06-23)
2,516 reads
Track object definition or table schema changes in any database. Batteries required: you need to create a few things to make it run.
2010-05-14 (first published: 2009-06-24)
1,739 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