Articles

External Article

Who the Devil Wrote This SQL Code?

The way that you format T-SQL code can affect the productivity of the people who have to subsequently maintain your work. It is never a good experience to see SQL Code, cry out “Who the devil wrote this code?”, and then realise that it was you. Grant gives some examples of bad formatting and explains why you should never check-in badly-formatted SQL code.

2016-11-29

6,105 reads

Technical Article

Experience SQL Server 2016 in Microsoft Luxembourg’s Intelligent Office

The SQL Server Luxembourg User Group invites you to join us at our next event, in Microsoft’s new Intelligent Offices, for Tom van Zele’s SQL 2016 presentation. Tom’s road-show session highlights SQL Server 2016’s new features: End-to-end mobile BI, advanced analytics, cloud integration and lots of other new stuff will be addressed.

(1)

You rated this post out of 5. Change rating

2016-11-28 (first published: )

3,352 reads

SQLServerCentral Article

Top 5 things you MUST know about PowerPivot for Excel

Although quite a lot has been written about PowerPivot and its features, there are certain aspects about PowerPivot that may not be obvious, especially to someone who is new to the tool. This articles discusses five such items.

(30)

You rated this post out of 5. Change rating

2016-11-25 (first published: )

9,766 reads

Blogs

The Book of Redgate: Profits

By

Redgate is a for-profit company. We look to make money by building and selling...

Session Materials for Techorama & DataGrillen 2026

By

I’ve uploaded the slides for my Techorama session Microsoft Fabric for Dummies and my...

Stop Using Pandas for Aggregations — Try DuckDB Instead

By

If you've ever loaded a 2 GB CSV into pandas just to run a...

Read the latest Blogs

Forums

Even When You Know What You're Doing, You Can Screw Up

By Grant Fritchey

Comments posted to this topic are about the item Even When You Know What...

The New Software Team

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The New Software Team

Database Mail in SQL Server 2022

By Abdellateef Ibrahim

Comments posted to this topic are about the item Database Mail in SQL Server...

Visit the forum

Question of the Day

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