Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Here are my declarations. Note that there is more than one column in the record.
- --The examples I could find online only use one column:
- type mytable_rec is record
- (
- mytable_col1 mytable.mytable_col1%type,
- mytable_col2 mytable.mytable_col2%type
- );
- type mytable_tab is table of mytable_rec;
- l_mytable mytable_tab ;
- --I've already loaded my query into l_mytable using bulk collect.
- --Skipping it for readability
- forall i in 1 .. l_mytable.count loop --The procedure won't compile
- --because of this line
- update mytable set
- mytable.mytable_col1 = i.mytable_col1,
- mytable.mytable_col2 = i.mytable_col2
- where 1 = 1; --some condition goes here
- end loop;
- forall i in l_mytable.first .. l_mytable.last loop --The procedure won't compile
- --because of this line
- update mytable set
- mytable.mytable_col1 = i.mytable_col1,
- mytable.mytable_col2 = i.mytable_col2
- where 1 = 1; --some condition goes here
- end loop;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement