Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SELECT (SELECT.....) bugging me
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
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