-
PL/SQL help with loops, method and explanation for Pl/SQL loops
All,
I am new to PL/SQL and just can't seem to get the syntax right.
I am a PL/SQL newbie trying to create a package that will get a result (ID) from a query from two tables and then turn around and loop through the one or more records found and do an insert into a another based on
a select from the previous query. This is what I have now:
DECLARE
rec_clarity_tdl clarity_tdl%ROWTYPE
rec_clarity_ser clarity_ser%ROWTYPE
BEGIN
CURSOR my_cursor IS
SELECT performing_prov_id from clarity_tdl
MINUS
SELECT not in clarity_ser_billing;
--returns performing_prov_id
--550130
LOOP
FOR prov_rec IN my_cursor
INSERT INTO provider_addl
VALUES (select * from provider where provid = prov_rec
-- one record by one from cursor
END LOOP;
END
/
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|