Re: How to use DISTINCT for two attributes combined

From: --CELKO-- <joe.celko_at_northface.edu>
Date: 28 Jul 2003 09:48:00 -0700
Message-ID: <a264e7ea.0307280848.49da7d2a_at_posting.google.com>


SELECT COUNT(DISTINCT A.a1 || A.a2)
  FROM FirstRel AS A, SecondRel AS B
 WHERE A.a3 = B.b1
 GROUP BY B.b2, B.b3;

Since this is SQL Server, use + for concatenation instead of the standard symbol. Received on Mon Jul 28 2003 - 18:48:00 CEST

Original text of this message