title: Why are none of my conditions being met in this proc?
body: <p>So i have a stored procedure (that's been watered down below for demo purposes) that aren't passing any conditions and thus aren't inserting/passing any values into my table. I've tried converting the varchar/string that is being passed in by Java to a number but nothing is working. Below is my 'simplified code'</p>
  
  <pre><code>Create or Replace Procedure SAMPLE(rValue IN VARCHAR)
  IS
  v_Max value.value%type;
  v_forecast value.value%type;
  BEGIN
  --
  SELECT BUFFER_MAX_VALUE
   INTO v_MAX
   FROM look_up;
  --
  EXCEPTION 
  WHEN no_data_found
  THEN SELECT 0
      INTO v_forecast
      FROM DUAL;
  --
   IF to_Number(rValue) &lt; 0 OR to_Number(rValue) &gt; v_MAX) 
   THEN 
   dbms_output.put_line('IF1 Works');
   insert into value(value_id, value)
             values(1, rValue);
  ELSIF rValue is null OR to_Number(rValue) = 0
   THEN
  dbms_output.put_line('IF1A ONLY Works');
   END IF;
  ELSE
  insert into value(value_id, value)
             values(1, v_forecast);
  dbms_output.put_line('IF1 ELSE ONLY Works');
  END SAMPLE;
  </code></pre>
  
  <p>i tried passing the following in:</p>
  
  <pre><code>BEGIN
  SAMPLE('-7');
  END;
  </code></pre>