jestrada101
Technical User
- Mar 28, 2003
- 332
Hello,
I have a merge into script that runs on Oracle 9i and I need to make it somehow run on Oracle 8i or create something similiar using PL/SQL.
It selects information from one table and inserts or updates information in another table.
Any guidance greatly appreciated..
----my merge---------------------
merge into mytable2 my2
using (
select
mydate,
sum(amount) amount
from
mytable
group by
mydate
) CH
on
(
my2.mydate = CH.mydate
)
when matched then
update set
my2.amount=(my2.amount + ch.amount)
when not matched then insert
(
mydate,amount
) values ( ch.mydate, ch.amount);
I have a merge into script that runs on Oracle 9i and I need to make it somehow run on Oracle 8i or create something similiar using PL/SQL.
It selects information from one table and inserts or updates information in another table.
Any guidance greatly appreciated..
----my merge---------------------
merge into mytable2 my2
using (
select
mydate,
sum(amount) amount
from
mytable
group by
mydate
) CH
on
(
my2.mydate = CH.mydate
)
when matched then
update set
my2.amount=(my2.amount + ch.amount)
when not matched then insert
(
mydate,amount
) values ( ch.mydate, ch.amount);