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,485 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,509 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,352 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,251 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,914 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,515 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 Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
If you've ever loaded a 2 GB CSV into pandas just to run a...
By James Serra
What problem is Fabric Ontology trying to solve? For years, most data conversations have...
Comments posted to this topic are about the item The New Software Team
Comments posted to this topic are about the item Database Mail in SQL Server...
Comments posted to this topic are about the item The string_agg function
We create the following table and then insert some records in it:
create table t1 ( id int primary key, category char(1) not null, product varchar(50) ); insert into t1 values (1, 'A', 'Product 1'), (2, 'A', 'Product 2'), (3, 'A', 'Product 3'), (4, 'B', 'Product 4'), (5, 'B', 'Product 5');What happens if we execute the following query in both Sql Server and PostgreSQL?
select id,
category,
string_agg(product, ';')
over (partition by category order by id
rows between unbounded preceding and unbounded following) as stragg
from t1; See possible answers