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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -