using subquery instead list name an seer transform statement
i need an transform matter used churned tables establish rows update, given oracle, churned tables aren't allowed. following query relapse "ora-00971: blank set keyword" error
update
table1 a,
table2 b
set
a.col1 = 'value'
where
a.fk = b.pk
b.col2 ('set values')
looking adult transform matter syntax oracle, i found following , shows subquery place list name.
when i attempted query this, i got "ora-01779: can't cgange buttress maps non key-preserved table"
update
(
select
a.col1
from
table1 a,
table2 b
where
a.fk = b.pk
b.col2 ('set values')
) update_tbl
set
update_tbl.col1 = 'value'
i rewrite query (show below) controlling an exists matter instead works fine, nonetheless still know done.
update
table1 update_tbl
set
update_tbl.col1 = 'value'
where
exists (
select
1
from
table1 a
table2 b
where
a.fk = b.pk
b.col2 ('set values')
update_tbl.pk = a.pk
)
thanks!
-nate
Comments
Post a Comment