I get the error
ORA-00984: column not allowed here
when I run this PLSQL script:
BEGIN
FOR i IN (
SELECT attribute_id
FROM odd_attribute
) LOOP
FOR j IN (
SELECT t1.sourceattribute_id
FROM odd_sourceattribute t1
WHERE t1.sourcetable_id IN (
SELECT t2.sourcetable_id
FROM odd_sourcetable t2
WHERE t2.sourcetable_name LIKE 'vr_db_f_%'
)
) LOOP
EXECUTE IMMEDIATE 'insert into odd_fact_attribute
(attribute_id, sourceattribute_id, statusattribute_name, other_stuff_to_describe_fact)
values
(i.attribute_id, j.sourceattribute_id, NULL, NULL)'
;
END LOOP;
END LOOP;
END;
The column names seems to be correct and I'm not able to figure out the cause of the error. Appreciate all the help. Thanks.