Rounding "down" to the nearest multiple of 5
Gurus,
I need some help rounding down to the nearest multiple of 5.
Example
before:
r-price = 100.00
s-price = 42.00
percent saved % = 60
after:
r-price = 100.00
s-price = 42.00
percent saved % = 55
So if the value is 51 - 54 round down to 50 and 56-59 round down 55.
How do I round down to the nearest multiple of 5 in my trigger?
create or replace
TRIGGER "SALE_CALCULATIONS" BEFORE
INSERT OR
UPDATE ON Prs FOR EACH Row
BEGIN
*:New.Prsvf19c := (ceil(((:new.prsprsc - :new.prsvf1c) / :new.prsprsc * 100) / 5) * 5) || '%';*
END;