Hi,
I have few DML STATEMENTS THAT I WOULD LIKE TO RUN VIA A PROCEDURE SO THAT I CAN USE IT AS AN INPUT INA CALVIEW, HOW WOULD I IMPLEMENT IT.
mY SQL STATEMENT IS
UPDATE "AVG_DIM" SET "MONTH" = MONTH(TO_DATE("ZDATE",'YYYYMMDD'));
UPDATE "AVG_DIM" SET
"YTD" = case when month(current_date) >= "MONTH"
then 'Y' else 'N' end,
"LASTTHREEMONTH" = case when month(current_date)-3 >= "MONTH"
then 'N' else 'Y' end,
"LASTMONTH" = case when month(current_date)-1 = "MONTH"
then 'Y' else 'N' end,
"LASTSIXMONTH" = case when month(current_date)-6 >= "MONTH"
then 'N' else 'Y' end;