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

SELECT (SELECT.....) bugging me

From: Anneke Treep <anneke_at_echelon.nl>
Date: 5 May 1999 09:51:00 GMT
Message-ID: <3xvOrducOdpb-pn2-8VbFqkpNpfgB@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 - 04:51:00 CDT

Original text of this message

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