Hey,
Please use the below query
select column1, substr(fst_path, (instr(fst_path, 'JJJ_image_lib') + LENGTH('JJJ_image_lib'))), fst_index,
substr(bck_path, (instr(bck_path, 'JJJ_image_lib') + LENGTH('JJJ_image_lib'))), bck_index, s_id, s_seq, t_seq
from SCHEMA.TABLE where code = '@{pipeline().parameters.Test}' and dept in ('A','B') and
fSt_index is not null ;
No need of order by while copying, so excluded it :)
Also the above code is w.r.t assumption you only needed to parameterise where code = '@{pipeline().parameters.Test}'
and replace test with your parameter name