Alternate to DECODE function to be used in elsif statment in PLSQL procedure [message #667943] |
Thu, 25 January 2018 06:09  |
 |
oracbeg
Messages: 16 Registered: July 2017
|
Junior Member |
|
|
Hello Everyone,
I am trying to use a condition els if where something like decode need to be used so that the condition is true and insertion is made. I am doing this in a sql procedure and condition is like
elsif((v_DIVIDEND/Divisor)-1 < ABS(0.2)) then insert into table(Divisor,b,c) values(Dividend,y,z)......it works fine when the divisor is not zero but when divisor is zero it gives error for same. i want to rule out zero's in divisor using like another nested if condition within elsif or something like decode. i tried another if but syntax seemed to be wrong. Using Decode says it can only be used in sql statement. Any suggestions please...
|
|
|
|
|