how can self join be used with Update statement ,have seen people mention merge statement ?
luvpurohit
Vertica Customer
is there a way to update a table while joining with itself ,is it possible using MERGE
0
Answers
With UPDATE no, because UPDATE supports subqueries and joins based on values that are stored in other tables.
The table you specify in the UPDATE list cannot also appear in the FROM list (no self joins).
With MERGE INTO you can.
Here is an example:
See: https://www.vertica.com/docs/10.1.x/HTML/Content/Authoring/AdministratorsGuide/Tables/MergeTables/MergeSourceData.htm