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,498 reads
Stored Procedure to build a MERGE statement in SQL 2008 using dynamic SQL.
2010-05-31 (first published: 2009-04-06)
2,498 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,482 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,014 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,498 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,344 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,245 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,909 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,956 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,513 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,736 reads
By James Serra
I’m honored to be hosting T-SQL Tuesday — edition #192. For those who may...
By Vinay Thakur
Continuing from Day 2 , we learned introduction on Generative AI and Agentic AI,...
Quite the title, so let me set the stage first. You have an Azure...
hi everyone I am not sure how to write the query that will produce...
Comments posted to this topic are about the item Rollback vs. Roll Forward
Comments posted to this topic are about the item Foreign Keys - Foes or...
I have some data in a table:
CREATE TABLE #test_data
(
id INT PRIMARY KEY,
name VARCHAR(100),
birth_date DATE
);
-- Step 2: Insert rows
INSERT INTO #test_data
VALUES
(1, 'Olivia', '2025-01-05'),
(2, 'Emma', '2025-03-02'),
(3, 'Liam', '2025-11-15'),
(4, 'Noah', '2025-12-22');
If I run this query, how many rows are returned?
SELECT *
FROM OPENJSON(
(
SELECT t.* FROM #test_data AS t FOR JSON PATH
)
) t; See possible answers