Generate stored procedure parameter list based on table
Generate stored procedure parameter list based on table, useful when creating new SPs on tables with lots of columns.
2009-12-04 (first published: 2009-11-10)
2,016 reads
Generate stored procedure parameter list based on table, useful when creating new SPs on tables with lots of columns.
2009-12-04 (first published: 2009-11-10)
2,016 reads
Returns the First or last day date of the month for a given date.
2009-12-01 (first published: 2009-11-11)
2,858 reads
Replacement script for usp_ShrinkDBLogs, updates for SQL 2008 deprecating the WITH TRUNCATE_ONLY method.
2009-11-27 (first published: 2009-10-30)
978 reads
Let’s say you have a result set with 5000 records but you want to display only 100 of them and in the same time to display the count of ALL records (5000).
2009-11-20 (first published: 2009-11-05)
2,464 reads
Split string like ('123,43,5465,6788,1231,111', ',') into table, separator (,) can be more than 1 char
2009-11-19 (first published: 2009-11-05)
1,376 reads
Data compression is a key feature with SQL 2008. This script, can compress all DB objects (partition/non-partitioned) according to Partition Range you specifiy.
2009-11-18 (first published: 2009-11-05)
1,158 reads
2009-11-17 (first published: 2009-11-06)
1,006 reads
This procedure searches for your criteria not only in code, but also in objectnames
2009-11-16 (first published: 2009-10-20)
1,090 reads
Returns records with errors from the default trace ordered by most recent first
2009-11-12 (first published: 2009-10-29)
700 reads
This procedure checks if a mirror treshold exists and wait until this treshold is cleared or after a specified time.
2009-11-10 (first published: 2009-10-23)
495 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