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: SELECT (SELECT.....) bugging me

Re: SELECT (SELECT.....) bugging me

From: Philippe <parnaud_at_yahoo.com>
Date: Wed, 5 May 1999 12:38:36 +0200
Message-ID: <7gp763$lrq$1@concorde.ctp.com>


Select dob.id, dob.somevalues, nvl(c.ApptCount,0) from dob, (select a.id, a.count(*) ApptCount from appt a group by a.id) c where c.id (+) = a.id

HTH,
Philippe

Anneke Treep wrote in message
<3xvOrducOdpb-pn2-8VbFqkpNpfgB_at_compaa.echelon.nl>...
>Hi All,
>
>I have run into this problem using SQL*Plus: Release 3.3.3.0.0 on an
>SCO_SV release 3.2v5.0.4 system running Oracle 7.3.3.3.0.
>
>I am trying to SELECT some values about a person (id=10) plus his
>total number of appointments, like this:
>
>SELECT id,
> (SELECT count(*) FROM appt WHERE id = 10),
> dob
>FROM persons
>WHERE id = 10;
>
>but this gives me the message:
>
>(select count(*) from appt where id = 10),
> *
>ERROR at line 2:
>ORA-00936: missing expression
>
>Any suggestions as to how to solve this?
>Many thanks in advance!
>--
>Anneke Treep | email:
>anneke_at_echelon.nl
> | web:
>www.echelon.nl
>ECHELON consultancy and software development | phone: +31 (0)53 48
>36 585
>PO Box 545, 7500AM Enschede, The Netherlands | fax: +31 (0)53 43
>36 222
>
Received on Wed May 05 1999 - 05:38:36 CDT

Original text of this message

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