Insert Into using a WITH clause (CTE) causes a ORA-00928
Try this:
insert into globalTablewith periods as(select cl.id uniqueIdfrom inv_mpan_hh_con_lines clleft join invoice_vat_lines vl on cl.invoice_id = VL.INVOICE_IDwhere rownum < 4)select uniqueId from periods;
CTE
(WITH-clause) is a part of SELECT
statement, according to the INSERT
syntax you can either specify values or SELECT
statement