BJCooperIT
Programmer
Is there a best practice rule-of-thumb regarding using DECODE when a simple NVL would do? I am trying to convince my client that something this:
should be changed to:
Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: www.EmuProductsPlus.com
Code:
UPDATE address
SET county_code = decode(rec.county_code,
NULL,county_code,
rec.county_code),
state_code = decode(rec.state_code,
NULL,state_code,
rec.state_code),
...
Code:
UPDATE address
SET county_code = nvl(rec.county_code,county_code),
state_code = nvl(rec.state_code,state_code),
...
Beware of false knowledge; it is more dangerous than ignorance. ~George Bernard Shaw
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
My website: www.EmuProductsPlus.com