As we know, self joins are not permitted int he update query, Do we have any workaround for this
I have a query which updates the target table based on a join condition
Code: Select all
Update target_table
set x= y
from
target_table tgt,(select column1 from target_table t, table2 t2, table3 t3
where t.a=t2.b
qualify row_number() over( partition by t.column_s order by t2.column_h desc) =1
)stg
where tgt.column_g="value"
;
This says self join is not allowed in updates
How do we achieve this.