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:

  1. Is there a publicly accessible draft of SQL:2011?
  2. 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.
  • I'll answer the first part as a comment - You have to pay for a copy of the standard (as far as I know) - Linking in an answer would be very naughty. – Philᵀᴹ Nov 15 '12 at 0:14
  • But there are freely available drafts for 2003/2008, ostensibly for comments? The texts for the final versions of 92/99 are completely free AFAIK. – 孔夫子 Nov 15 '12 at 0:15
  • 1
    Are you writing an engine? If not, what does it matter? – Hannah Vernon Nov 15 '12 at 1:30

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 <concatenation> is the null value.

  • Thanks! I knew it was the standard, but just didn't know where the reference was. – 孔夫子 Nov 15 '12 at 8:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.