I am trying to see how the below is possible in sql.
I have a few thousand records I will be updating into an Oracle table.
The values are stored in an array, and are just a lists of numbers.
If the number is a positive I want to add the value to the field I am updating in Oracle, if the value is a negative I want to subtract the value from the data already in the field I am updating.
ex: array would have: 50, -20, 6, -23000, 30
The other item is that if the field is blank I would want to add or subtract from the blank field like it was a zero.
I am trying to perform the entire function in sql vrs. php.
I hope this makes sense.