-----4个分割符号
sel distinct oreplace(substr(memo,instr(Memo,’|’,1,4)+1),‘HD=’) version_a–substr(memo,instr(memo,1,’|’,4)+1)
from T05_ON_BOARD_ORDER_EVT where Sys_Src_Cd=‘CTS’
and chan_id = ‘a’
and Trade_Dt>date’2019-01-01’
and instr(Memo,’|’,1,4)>0
and instr(Memo,’|’,1,5) =0
and translate_chk(oper_ip_addr || memo using latin_to_unicode)=0
-----大于等于5个分割符号
sel distinct oreplace(substr(memo,instr(Memo,’|’,1,4)+1,instr(Memo,’|’,1,5)-instr(Memo,’|’,1,4)-1),‘HD=’) version_a–substr(memo,instr(memo,1,’|’,4)+1)
from T05_ON_BOARD_ORDER_EVT where Sys_Src_Cd=‘CTS’
and chan_id = ‘a’
and Trade_Dt>date’2019-01-01’
and instr(Memo,’|’,1,5)>0
and translate_chk(oper_ip_addr || memo using latin_to_unicode)=0