CONCATENATION IN CASE WHEN STATEMENT : I WANTED TO CHECK IF ALL THE TABLE_NAMES TO BE CREATED ARE EXISTING. IF EXISTING, WE NEED TO DROP THEM FIRST. THIS IS THE LOGIC THAT I'VE CREATED, THIS IS MY FIRST TIME TO CONCAT USING CASE WHEN. THE ERROR HERE IS THAT CONCAT CANNOT BE READ IN CASE WHEN. IS THERE ANY OTHER WAY TO CHECK IF TABLE NAMES ARE EXISTING? OR IS THERE A WAY TO PROCEED WITH THIS LOGIC WITH SUGGESTIONS OF TO FIX THIS THANK YOU!

`enter code here SET SERVEROUTPUT ON;    
DECLARE 
    v_bs_drop_table VARCHAR2(50); 
    v_ebi_drop_table VARCHAR2(50);
BEGIN
    FOR rec IN (SELECT table_name FROM user_tables WHERE LOWER(table_name) LIKE 'mpiat_after_bs_%')
        LOOP  
            CASE rec.table_name
                WHEN 'mpiat_after_bs_' || SUBSTR(TO_CHAR(SYSDATE, 'ddmonyy'), 3, 5) || '_t'
                    THEN
                        v_bs_drop_table := 'DROP TABLE ' || 'mpiat_after_bs_' || SUBSTR(TO_CHAR(SYSDATE, 'ddmonyy'), 3, 5) || '_t';
                        DBMS_OUTPUT.PUT_LINE(v_bs_drop_table);
                        EXECUTE IMMEDIATE v_bs_drop_table;  
                WHEN 'mpiat_after_bs_ebi_' || SUBSTR(TO_CHAR(SYSDATE, 'ddmonyy'), 3, 5) || '_t'
                    THEN
                        v_ebi_drop_table := 'DROP TABLE ' || 'mpiat_after_bs_ebi_' || SUBSTR(TO_CHAR(SYSDATE, 'ddmonyy'), 3, 5) || '_t';
                        DBMS_OUTPUT.PUT_LINE(v_ebi_drop_table);
                        EXECUTE IMMEDIATE v_ebi_drop_table;   
                ELSE 
                    DBMS_OUTPUT.PUT_LINE('NO EXISTING TABLE NAMES');
            END CASE;
        END LOOP;
END;`


    

