May 2020

How to write merge statement in SQL Server

SQL Server provides the MERGE statement that allows you to perform three actions at the same time. If you use the INSERT, UPDATE, and DELETE statement individually, you have to construct three separate statements to update the data to the target table with the matching rows from the source table. The following shows the syntax …

How to write merge statement in SQL Server Read More »

Finding a SQL Server running Task with percentage complete using DMVs

How to Tracking query progress with Live Query Statistics In SQL Server Some tasks that are running take a long time to run and it is sometimes difficult to tell whether these tasks are progressing or not. With the help of below script we are able to track the percentage completion of tasks like:- Database …

Finding a SQL Server running Task with percentage complete using DMVs Read More »