if statement within SELECT?
Howdy..trying to create a new column for viewing only...new column is a percentage of another column...but if the divisor column is zero, I want the value to be 1. basically:
IF A.PRICE_VNDR = 1 then NEW COLUMN = (((A.PRICE_VNDR)-(B.PRICE_VNDR))/(A.PRICE_VNDR)*100)
IF A.PRICE_VNDR = 1 then NEW COLUMN = 1
can I do this with SQL? I am creating it via PeopleSoft query, but I should be able to use regular Oracle SQL. My second thought was to create a view and 'store' the new column there.
Thanks!!! Please respond to timmbuck2@yahoo.com
Timm