Hi all,
I've been in stuck on updating a table. Here is the query.
with
tab_one ( "col_1", "col_2", "col_3", "col_4" ) as (
select ax."col1", ax."col2", bx."col1", bx."col2"
from schm1.tab_a ax, schm2.tab_b bx
where ~~
),
tab_two ( "col_1", "col_2", "col_3", "col_4" ) as (
select axx."col_1", axx."col_2", axx."col_3", axx."col_4"
from tab_one axx, tab_one bxx
where ~~~
)
UPDATE schm1.tab_a tg
SET tg."col_Y" = t2."col_3"
FROM schm1.tab_a tg, tab_two t2
WHERE tg."col_X" = t2."col_1";
What did I screw up?