Hello Sir,
Can we write a multiple case statements for a column in sql
I have only one column as a reactorance column in a table
The DB version is oracle 19.0.0.0.0
I wanted to do a calculation for a field.
I have a meter table where we have a measurement record as well as a previous measurement record for a meter.
The logic i wanted to write is
case when measurement_1 is not null and measurement_2 is not null
(measurement - previous_measurement/previous_measurement) * 100 and if this percentage deviation is < 5 then make it 'Normal'
when there is no previous measurement then take the attribute value and the calculation would be
(measurement - attribute_value)/attribute_value) * 100 and if this percentage deviation is <=5 then make it normal.
How can this be achieved this.
Appreciate your help sir