select tmp.op_nr, @op_nr := tmp.previous_op_nr, @depth:=@depth+1 from (select @op_nr=280, @depth:=0 ) as vars, dwh.temporary_table tmp where tmp.op_nr=@op_nr and @depth<10;
281 | 0 280 | 281 279 | 280
277 | 278 276 | 277 275 | 276
(select @op_nr=280, @depth:=0 ) as vars,
(select @op_nr:=280, @depth:=0 ) as vars,
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)