1

SQL plus is giving "from keyword not found where expected". I think my query is correct select ... from ... where I think there is a possibility that we cannot use two variables in a query in PL/SQL block (I'm not sure about that).

DECLARE
  LHID   NUMBER(1);
  LNOPAT NUMBER(6);
BEGIN
  SELECT HID INTO LHID, 
         NUMPATIENTS INTO LNOPAT 
    FROM HOSPITAL065 
   WHERE HLOCATION='LAHORE';

   DBMS_OUTPUT.PUT_LINE ('HID:  ' || LHID || ' GOT PATIENTS  ' ||  
                         LNOPAT || '  LOCATED IN         LAHORE');
END;

Suggestions are welcome!

1 Answer 1

1

You want to use one into only:

select hid, numpatients
   into lhid, lnopat
....
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.