I have an update to do on a Oracle 11g table and am looking for coding best practices.
Example:
UPDATE TABLE1
SET TRANSACTION_CODE = '3001', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'EDI adjustment credit - Sequestration - reduced fe' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
UPDATE TABLE1
SET TRANSACTION_CODE = '3801', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'Late Charge Processing - Late Charge Reversal' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
UPDATE TABLE1
SET TRANSACTION_CODE = '1704', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'Collection agency payment - Bad Debt Recovery' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
Should this be combined into 1 update statement using DECODE, IF THEN ELSE, etc. or simply update using the individual updates?
Any suggestions would be appreciated.
Thanks in advance.
Example:
UPDATE TABLE1
SET TRANSACTION_CODE = '3001', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'EDI adjustment credit - Sequestration - reduced fe' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
UPDATE TABLE1
SET TRANSACTION_CODE = '3801', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'Late Charge Processing - Late Charge Reversal' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
UPDATE TABLE1
SET TRANSACTION_CODE = '1704', UPDATES = 'Y' WHERE TECHNICAL_DESCRIPTION = 'Collection agency payment - Bad Debt Recovery' AND TRANSACTION_AMOUNT > 0 AND TRANSACTION_CODE =' ';
Should this be combined into 1 update statement using DECODE, IF THEN ELSE, etc. or simply update using the individual updates?
Any suggestions would be appreciated.
Thanks in advance.