A T-SQL query to get current job activity
I recently had the task of collecting job activity for the purposes of turning it into a report for some...
2013-09-05
15,872 reads
I recently had the task of collecting job activity for the purposes of turning it into a report for some...
2013-09-05
15,872 reads
When I run “Script (say table) as” it isn’t (or is) (say generating scripts for indexes). How do I fix...
2013-09-03
769 reads
I was wondering the other day how VLF (Virtual Log File) sizes effected shrinking the log file so I decided...
2013-08-29 (first published: 2013-08-26)
2,633 reads
I like practice tests. Once I feel like I’m getting ready to take a certification exam I start taking an...
2013-08-28
1,025 reads
I recently read an awesome post on http://www.stackexchange.com questioning how to change columns to rows ie UNPIVOT. One answer demonstrated...
2013-08-21
1,320 reads
Last week I posted my stored procedure for database permissions, sp_DBPermissions. A couple of days later I was demonstrating it...
2013-08-19
1,451 reads
At first glance these two functions seem very similar, and superficially they are. For example COALESCE(fieldname1, fieldname2) and ISNULL(fieldname1, fieldname2)...
2013-08-16 (first published: 2013-08-07)
8,889 reads
Last week I posted a series of database permissions scripts. I’ve been using them quite a bit over the last...
2013-08-14
1,473 reads
“My transaction log is too big!” I wish I had a dime for each time phrase has been spoke, written,...
2013-08-12
1,662 reads
Over the last year of blogging my thoughts and queries I’ve discovered something interesting. I posted Where is my Backup?...
2013-08-05
1,434 reads
By Steve Jones
Redgate is a for-profit company. We look to make money by building and selling...
I’ve uploaded the slides for my Techorama session Microsoft Fabric for Dummies and my...
If you've ever loaded a 2 GB CSV into pandas just to run a...
Comments posted to this topic are about the item Even When You Know What...
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...
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