Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: How to use DISTINCT for two attributes combined

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@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 - 11:48:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US