title: Oracle error while running created procedure
body: <p>I have Oracle database based on Hotel room stay overs. 
  I have created a procedure Room_taken and I can't make it work.</p>
  
  <p><strong>This is my SQL procedure code:</strong></p>
  
  <pre><code>CREATE
  PROCEDURE Room_taken
  (
  v_guestID IN NUMBER DEFAULT NULL ,
  v_stayfrom IN DATE DEFAULT NULL ,
  v_stayto IN DATE DEFAULT NULL ,
  v_roomID IN NUMBER DEFAULT NULL ,
  v_paymentID IN NUMBER DEFAULT NULL ,
  v_totalprice IN NUMBER DEFAULT NULL 
  )
  AS
  v_nofrom DATE;
  v_noto DATE;
  v_idroom NUMBER(10,0);
  
  BEGIN
  
  BEGIN
  SELECT Stay_from, Stay_to     
  INTO v_nofrom, v_noto
  FROM Stayover
  WHERE ID_room = v_roomID;
  IF NOT ( v_nofrom &gt;= v_stayfrom
  AND v_noto &lt;= v_stayto ) THEN
  
  BEGIN
  INSERT INTO Stayover
  ( Stay_from, Stay_to, Total_price, ID_Room, ID_Guest, ID_Payment )
  VALUES ( v_stayfrom, v_stayto, v_totalprice, v_roomID, v_guestID, v_paymentID );
  END;
  ELSE
  
  BEGIN
  raise_application_error( -20002, 'Room is taken!' );
  END;
  END IF;
  END;
  END;
  </code></pre>
  
  <p><strong>When I run procedure after entering following parameters:</strong></p>
  
  <pre><code>DECLARE
  v_guestID NUMBER;
  v_stayfrom DATE;
  v_stayto DATE;
  v_roomID NUMBER;
  v_paymentID NUMBER;
  v_totalprice NUMBER;
  BEGIN
  v_guestID := 1;
  v_stayfrom := '17.01.2012';
  v_stayto := '19.01.2012';
  v_roomID := 1;
  v_paymentID := 1;
  v_totalprice := 300;
  
  Room_taken(
  v_guestID =&gt; v_guestID,
  v_stayfrom =&gt; v_stayfrom,
  v_stayto =&gt; v_stayto,
  v_roomid =&gt; v_roomid,
  v_paymentID =&gt; v_paymentID,
  v_totalprice =&gt; v_totalprice
  );
  END;
  </code></pre>
  
  <p><strong>I got an error:</strong></p>
  
  <pre><code>Connecting to the database HOTEL.
  ORA-01403: no data found
  ORA-06512: at "HOTEL_ROOMS.ROOM_TAKEN", line 18
  ORA-06512: at line 16
  Process exited.
  Disconnecting from the database HOTEL.
  </code></pre>
  
  <p>What am I doing wrong?</p>