Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

oracle search

Wednesday, August 6, 2008

If in doubt, test, test and test again ....oracle

Thanks to Rob Baillie for the following example...


I was glancing through some legacy code today, and came across this.

It's funny how barnacles can accumulate when code changes over time.

            if r2.status_id = 3 then
v_gp := r2.rate;
elsif r2.status_id in (11, 12) then
if r2.type_id = 3 then
v_gp := r2.rate;
else
v_gp := r2.rate;
end if;
else
v_gp := r2.rate;
end if;

Skip over the record being called r2 and work out what it actually does...

No comments: