Please forgive me I was just trying to make a simple point
Try this:
sum( case
when Fieldx = 123 and fieldy = 432
then (fieldx - 1) * (fieldy + 2)
else 0
end) as SomeTotal
Keep in mind that this is PL/SQL code running on Oracle 8.1.7
What is Wisdom?
Wisdom - The ability to respond to any situation according to God's Plan.
Therefore:
USE Wisdom IN Everything ORDER priority AS Knowledge
SELECT Knowledge
BROWSE FOR Understanding WHERE Wisdom=Guide
LeRoy Jackson