JonathanHolliday
Technical User
Hi,
I'm looking for a simple statement to conditionally replace a value.
I have a value field that could be negative or positive depending on a Debit/Credit field.
Thus I need to query something like:
select {IF type = "debit" THEN value ELSE value * -1}
from table
Obviously the code in {} doesn't exist, is there such a code in informix without resorting to a procedure?
Yes, I'm new to Informix so forgive the fundamental question.
Thanks
Jonathan.
I'm looking for a simple statement to conditionally replace a value.
I have a value field that could be negative or positive depending on a Debit/Credit field.
Thus I need to query something like:
select {IF type = "debit" THEN value ELSE value * -1}
from table
Obviously the code in {} doesn't exist, is there such a code in informix without resorting to a procedure?
Yes, I'm new to Informix so forgive the fundamental question.
Thanks
Jonathan.