concatenation - How to concatenate rows together until a condition is met in Teradata 13 -


i have following table:

id_clt  steps             inner rank 61081   round_sig_1               1 61081   ar_ok                     2 61081   abs_ft                    3 61081   round_sig_2               1 61081   tech_dispatch             2 61081   ar_ok                     3 61081   ret_ft                    4 61081   ret                       5 61081   closed                    1 

i want concatenate steps until inner rank reset 1,in other words, want following output:

id_clt  steps                                           inner rank 61081   round_sig_1 ar_ok abs_ft                             1 61081   round_sig_2   tech_dispatch ar_ok reft_ft ret        1 61081   closed                                               1 

concerning input table, simplified version of query use is:

select alpha.id_clt ,               alpha.steps,              rank() on (partition alpha.id_clt             order alpha.rnk            reset when (alpha.steps 'round%' or  alpha.steps 'closed')) seqq (  select  id_clt, steps, rnk) alpha 

where rnk column orders different steps in time given id_clt

is there idea how can proceed obtain result? have tried many tricks rank(), row_number() , reset syntax didn't work...

thank in advance.

regards.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -