I'm fairly new to the procedural language side of PL/SQL, so forgive me if this is basic.
I'm trying to put values in a table I've previously created outside of this code block. This code is currently getting an error on the sixth line. Any idea why?
BEGIN
FOR c IN (SELECT name FROM clients) LOOP
FOR d IN (SELECT customer_id, alt_name FROM customers) LOOP
IF d.alt_name LIKE '%' || c.name || '%'
THEN
INSERT INTO previously_made_table(name, customer_id, alt_name, customer_code) VALUES(c.name, d.customer_id, d.alt_name, '101');
COMMIT;
END IF;
END LOOP;
END LOOP;
END;