I have several queries unioned together, all of which have the same date parameter in the where clause. I'd like to make this easy to update. I've written T-SQL variables but PL SQL is a bit different. Trying to figure out how to execute something like this:
DECLARE
l_DATE DATE:= '01-JAN-18';
BEGIN
SELECT
ORDER_NUMBER, ORDER_DATE
FROM
T.ORDERS
WHERE
ORDER_DATE >= DBMS_OUTPUT.put_line(l_DATE);
END;
I'm using Oracle SQL Developer Version 17.2.0.188 Oracle Database 11g 11.2.0.40.0