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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Can I do this in SQl

Re: Can I do this in SQl

From: Bjarni Ragnarsson <bjarnir_at_centrum.is>
Date: Sun, 19 Sep 1999 10:50:19 +0100
Message-ID: <37E4B1DA.B40CF0AB@centrum.is>


There are probably numerous ways to do this. If I understand you correctly, this should work:

  Select Count(*)
  From TableA a, TableB b
  Where b.Z = a.Q

      And b.Y = 'London';

Bjarni Ragnarsson
bjarnir_at_centrum.is

namnan_at_my-deja.com wrote:

> I want to ask the following question in SQL:
>
> I have two tables A and B, where table B contains a column Y that is a
> long text description of another column in B (say column Z).
> So, eg, Y contains 'London' and Z contains 'L'.
> The values of this column Z also exists in Table A (say column Q). So Q
> contains 'L'.
>
> How can I say:
>
> Give me count of all the rows in TableA where TableB.Y = 'London';
>
> Thanks in advance
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
Received on Sun Sep 19 1999 - 04:50:19 CDT

Original text of this message

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