What i want to do is to create a column 'ID_DESLIG' with the following rules:
when STATE is 'LIGADO' then ID_DESLIG will be the id of the previous STATE is 'DESLIGADO', for the same panel;
when STATE is 'DESLIGADO' then ID_DESLIG will be the id of the current row;
An example of what i want
Thanks in advance for the help
See Question&Answers more detail:os