BJCooperIT
Programmer
My client has a procedure in a package that has an IF statement that is repeated in four separate places. It reads something like this:
I am considering recommending that this be made into a function. Besides the obvious advantage of centralizing code and ease of maintenance, would this have an affect on performance? This code processes almost 10 million rows when it runs.
[sup]Beware of false knowledge; it is more dangerous than ignorance. ~ George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)
Code:
IF v_code IN
( 'CA','CF','CN','CT','JO','ND','NT','P1','P3',
'PA','PB','PC','PD','PE','PF','PH','PJ','PK',
'PL','PM','PN','PO','PP','PR','PS','PT','PU',
'PW','SF','SG','SO','SS','ST','SW','UO','Y3',
'Y5','Y8','YA','YB','YD','YG','YK','YM','YN',
'YO','YR','YT','YT','YU','YV','YW','YX','YY',
'YZ','Z1','Z2','Z3','Z5','ZE','ZF','ZG','ZH',
'ZL','ZM','ZN','ZS','ZT','ZU','ZV','ZW','ZX'
) THEN
[sup]Beware of false knowledge; it is more dangerous than ignorance. ~ George Bernard Shaw[/sup]
Consultant Developer/Analyst Oracle, Forms, Reports & PL/SQL (Windows)