0
I have the following structure in my database:
- Table
tgffinwith the columns:CODNAT,AD_CODNAT_OLD - Table
tgfnatwith the columns:CODNAT,AD_NAT_OLD
I want to reclaim the value of tgfnat.CODNAT when tgfnat.AD_NAT_OLD = tgffin.AD_CODNAT_OLD and subsequently update tgffin.CODNAT using the value recovered from the previous query.
How can I do this using a single SQL statement?