Hello,
today i have the following question:
I need a SELECT statement that can also return the value of row n+1, which means:
SELECT
CASE nr = 1 THEN nr
CASE nr = 5 THEN nr
ELSE nextRow.nr
I guess this is not makeable with a select statement but seems to be a common problem (IF x THEN take the value of the next row). Therefore is there a way to solve this problem with a self-join (isn't it slow then?) or something else?
Thx
today i have the following question:
I need a SELECT statement that can also return the value of row n+1, which means:
SELECT
CASE nr = 1 THEN nr
CASE nr = 5 THEN nr
ELSE nextRow.nr
I guess this is not makeable with a select statement but seems to be a common problem (IF x THEN take the value of the next row). Therefore is there a way to solve this problem with a self-join (isn't it slow then?) or something else?
Thx