I want to use decode in PLSQL package where I need to add a condition inside an insert statement when a product is defined as a specific constant name (like MyProd)
Insert statement has lots of columns inserted but I wanted to add one condition for a field units
insert into temp_table
(select 'a',decode(prod,'MyProd',units = units + units *0.10,null,'b',..)
I know I had the syntax wrong for decode but this is what I like to do,
First test if the prod name is MyProd, if it is then
units will be units + units *0.10
How could this be accomplished?