'Between...and' operator converts text to date type : Between and « PL SQL « Oracle PL / SQL






'Between...and' operator converts text to date type

 
SQL>
SQL>
SQL> DECLARE
  2     lv_test_date VARCHAR2(10) := '01-FEB-99';
  3  BEGIN
  4     IF  lv_test_date BETWEEN '31-JAN-99' AND '10-FEB-99' THEN
  5        DBMS_OUTPUT.PUT_LINE('TRUE');
  6     ELSE
  7        DBMS_OUTPUT.PUT_LINE('FALSE');
  8     END IF;
  9  END;
 10  /
FALSE

PL/SQL procedure successfully completed.

SQL>

 








Related examples in the same category

1.'Between...and' operator for number value
2.'Between...and' operator for text value
3.'Between...and' operator for Date type