title: ERROR PLS-00103: Encountered the symbol "DECLARE"?
body: <p>I have a procedure that is bringing up the error 'PL/SQL: Statement ignored'. This message is a little vague and I cant figure out why my procedure won't compile. All the procedure should do is check if the customer's delivery date is less then the SYSDATE and if it is delete and if not print 'customer can't be deleted'.</p>
  
  <p>The code for the procedure is here:</p>
  
  <pre><code>    CREATE PROCEDURE remove_customer (customer_id VARCHAR2) IS
  declare
     ordersCount pls_integer;
  BEGIN
     select count(*) into ordersCount 
     from placed_orders 
     where fk1_customer_id = remove_customer.customer_id
     and delivery_date &lt; sysdate;
  if ordersCount = 0 then
  THEN
  DELETE FROM order_line
  WHERE  order_line.FK1_order_id in
  (SELECT order_id FROM placed_order
   WHERE placed_order.FK1_customer_id = remove_customer.customer_id
  );
  DELETE FROM placed_order
  WHERE placed_order.FK1_customer_id = remove_customer.customer_id;
  DELETE FROM customer
  WHERE customer.customer_id = remove_customer.customer_id;
  total_customers := total_customers - 1;
  ELSE
  DBMS_OUTPUT.PUT_LINE 'Customer currently has a order been delivered';
  END IF;
  END;
  </code></pre>
  
  <p>And the error message is specifying PLS-00103: Encountered the symbol "DECLARE"</p>
  
  <p>thanks for any advice.</p>