title: oracle sql procedure with in and multi out params error
body: <p>I created a procedure to get multiple out params. But compilation error came. I couldn't find the issue. please, I need some support to find the issue.............</p>
  
  <p>my code is,</p>
  
  <p>Basic database customer, reservation and service tables are below,</p>
  
  <pre><code>CREATE TABLE CUSTOMER
         (CUSTOMER_ID NUMBER(4) NOT NULL,
          CUSTOMER_NAME VARCHAR2(10),
          GENDER VARCHAR(10),
          ADDRESS VARCHAR(50),
          EMAIL VARCHAR(50),
          DISCOUNT FLOAT(10),
          PRIMARY KEY(CUSTOMER_ID)
          );
  
  CREATE TABLE SERVICE
          (SERVICE_ID NUMBER(4) NOT NULL,
          SERVICE_NAME VARCHAR(100),
          CHARGE FLOAT(10),   
          PRIMARY KEY(SERVICE_ID)             
          );
  
  CREATE TABLE RESERVATION
          (RESERVATION_ID NUMBER(4) NOT NULL,
          RESERVATION_DATE DATE,
          CUSTOMER_ID NUMBER(4),
          SERVICE_ID NUMBER(4),
          EMPLOYEE_ID NUMBER(4),
          PRIMARY KEY(RESERVATION_ID),
          FOREIGN KEY (CUSTOMER_ID) REFERENCES CUSTOMER(CUSTOMER_ID),
          FOREIGN KEY (SERVICE_ID) REFERENCES SERVICE(SERVICE_ID),
          FOREIGN KEY (EMPLOYEE_ID) REFERENCES EMPLOYEE(EMPLOYEE_ID)              
          );
  </code></pre>
  
  <p>I need to get some vales from the reservation table, service table and customer table. my procedure is below,</p>
  
  <pre><code>SET SERVEROUTPUT ON
  CREATE OR REPLACE PROCEDURE GET_RECEIPT(
      RES_ID IN RESERVATION.RESERVATION_ID%TYPE,
      C_NAME OUT CUSTOMER.CUSTOMER_NAME%TYPE,
      S_NAME OUT SERVICE.SERVICE_NAME%TYPE,
      CHARGE_VAL OUT FLOAT(10),
      DISCOUNT_VAL OUT FLOAT(10),
      TOTAL_VAL OUT FLOAT(10)
      ) 
  AS
  BEGIN
      SELECT 
          c.CUSTOMER_NAME AS CUS_NAME INTO C_NAME,
          s.SERVICE_NAME AS SER_NAME INTO S_NAME,
          s.CHARGE AS CHAR_VAL INTO CHARGE_VAL,
          c.DISCOUNT INTO DISCOUNT_VAL,
          (s.CHARGE-c.DISCOUNT)AS TOTAL INTO TOTAL_VAL 
      FROM RESERVATION r LEFT OUTER JOIN CUSTOMER c ON r.CUSTOMER_ID=c.CUSTOMER_ID LEFT OUTER JOIN SERVICE s ON r.SERVICE_ID=s.SERVICE_ID 
      WHERE r.RESERVATION_ID=RES_ID;  
  END;
  /
  </code></pre>
  
  <p>But this procedure couldn't compile. it says compilation fails. how can I fix this?</p>