update -- almost done. for now, comments were copied over from the COMMENTS to the corresponding
ALL I need is the Onyx codes meanings and mappings...
New Action, All codes from Wtexp to WTexp. Uff.. but DONE
Found some oddities.
"Qmf2" codes appear in several places, moved to Discharge Qlty as "Qmf".
Purpose -- make it easier for Aquarius export.
Move codes from COMMENTS columns into corresponding.
WATER TEMP QLTY
One way to do this is issue about 12 update statements per Stream w/ comments.
Actually, 24 update statements, to make it perfect.
UPDATE HOARE.AIKEN_HYDRO SET "DISCHARGE QLTY"=("DISCHARGE QLTY"||'; Qmf') where COMMENTS like '%Qmf%' and "DISCHARGE QLTY" IS NOT NULL;
UPDATE HOARE.AIKEN_HYDRO SET "DISCHARGE QLTY"=("DISCHARGE QLTY"||'Qmf') where COMMENTS like '%Qmf%' and "DISCHARGE QLTY" NOT LIKE '%Qmf%';
We would need to use this template for each of the 12 codes, and each stream table. Then follow by an "update ... set COMMETS -> null" on
those legacy codes, all relevant tables
Explanation: Those two SQL sentences add the word 'Qmf' to the "discharge quality comments' for all AIKEN stream discharge records that have a Qmf in the comments field. The reason of having two sentences is to make sense of the separators "Existing Comment; Qmf" vs "Qmf"
Replate AIKEN with any other stream, and Qmf w/ any of the other 11 codes, and we are complete.