I can't figure this out, I only want to substitute the &&QC_NUM portion, but I get prompted for a &&QC_NUM_Phase1 variable. I thought concating the sub-var with the rest of the string would fix it, but nope.
DECLARE
c INT;
BEGIN
SELECT COUNT(*)
INTO c
FROM user_tables
WHERE table_name = upper('QC_'||&&QC_NUM||'_Phase1');
IF c = 1 THEN
EXECUTE immediate 'drop table QC_'||&&QC_NUM||'_Phase1';
END IF;
END;
/
select 'asd'||&&var1||'asd' from dual;in oracle sql developer and it works as expected.