HI,
I want to pass the date 201802 as a variable in the below query. Here the date is attached with a string.
declare
v_date date;
v_count number;
begin
SELECT TO_CHAR(SYSDATE,'YYYYMM')-1 into v_date FROM DUAL;
select count(*) into v_count from orders partition (status_wi_dat_201802); ------Here i want to pass the variable v_date
dbms_output.put_line('Record count:'|| v_count);
end;
Can you please suggest.
Thanks.