Question
-
Topic
-
I need a help with sql nested sub query please.
LockedHi,
I can create this view;CREATE VIEW view1 AS
SELECT p.bedno, p.refno, p.surename
FROM patient p
WHERE p.bedno =
(SELECT bedno
FROM bed
WHERE bedstatus = ‘USED’);But when I “SELECT * FROM view1″, I get this error message it says ” ERROR at line 2:
ORA-01427: single-row subquery returns more than one row”.
I need count “bedstatus”, help me please.
Thank you
All Answers
Viewing 3 reply threads