I want the field PP.POSPAY_SALARY_MIN modified depending on the value in P.POS_HRLY_OR_SLRY. Not sure the best way to do this.
select distinct
...
P.POS_HRLY_OR_SLRY,
PP.POSPAY_SALARY_MIN,
...
So the logic would be
if P.POS_HRLY_OR_SLRY = 'S' then PP.POSPAY_SALARY_MIN / 1000 else PP.POSPAY_SALARY_MIN / 10;
PP.POSPAY_SALARY_MIN is coming out of the database as a integer/character, no decimal points. If I could get the conditional statement correct I suppose I could also use a substring to remove the trailing zeros.
select distinct
...
P.POS_HRLY_OR_SLRY,
PP.POSPAY_SALARY_MIN,
...
So the logic would be
if P.POS_HRLY_OR_SLRY = 'S' then PP.POSPAY_SALARY_MIN / 1000 else PP.POSPAY_SALARY_MIN / 10;
PP.POSPAY_SALARY_MIN is coming out of the database as a integer/character, no decimal points. If I could get the conditional statement correct I suppose I could also use a substring to remove the trailing zeros.