oracle - How do I use an INSERT INTO with this PL/SQL code block? -
i'm new procedural language side of pl/sql, forgive me if basic.
i'm trying put values in table i've created outside of code block. code getting error on sixth line. idea why?
begin c in (select name clients) loop d in (select customer_id, alt_name customers) loop if d.alt_name '%' || c.name || '%' insert 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;
you don't need pl\sql here
insert previously_made_table (name, customer_id, alt_name, customer_code) select c.name, d.customer_id, d.alt_name, '101' clients c , customers d d.alt_name '%' || c.name || '%'
Comments
Post a Comment