Hi guys,
some times I use WITH as
Code:
with tmp (name,work) as ( select empno,job from employee) select * from tmp ;
I am wondring how can I update a table by using contents of temprary table.
e.g
Code:
with tmp (name,work) as ( select empno,job from employee) update xyz
set lname= (select name from tmp fetch first 1 row only) ;
I haven't seen any example like this , but there must be some way to do it.
DB2 is pointing an error on
update.
I tried to search documentation, but did not find any example using WITH and UPDATE together.
Please help.
DBFinder