patternMinor
SQL ISO Standard for group concatenation
Viewed 0 times
groupsqlstandardforisoconcatenation
Problem
Is there an operator in the latest standard SQL:2011 (or earlier) that will handle group concatenation the likes of which we currently have to resort to these tricks for?
Here's a recent question on this site for which various answers were given to different RDBMS.
Since this is a small question for the heavyweight site DBA.SE, please find two sub-parts to the question:
- GROUP_CONCAT in MySQL
- FOR XML in SQL Server
- LISTAGG in Oracle
- string_agg in PostgreSQL
Here's a recent question on this site for which various answers were given to different RDBMS.
Since this is a small question for the heavyweight site DBA.SE, please find two sub-parts to the question:
- Is there a publicly accessible draft of SQL:2011?
- Which part of the SQL standard (any revision) states that CONCAT NULL should YIELD NULL? I can't seem to track it down in the volume of text in the standard.
Solution
The wiscorp.com page SQL Standards has several older revisions and drafts of SQL:20nn (zip):
The 7IWD2-02-Foundation-2011-12.pdf, with a date of 2011-12-21 has at page 289:
If at least one of S1 and S2 is the null value, then the result of the `` is the null value.
The 7IWD2-02-Foundation-2011-12.pdf, with a date of 2011-12-21 has at page 289:
If at least one of S1 and S2 is the null value, then the result of the `` is the null value.
Context
StackExchange Database Administrators Q#28698, answer score: 4
Revisions (0)
No revisions yet.