直接上图上代码
例子:‘123,456,789,’
select ''''||replace('123,456,789',',',''',''')||'''' from dual;
instr 操作
select sum(asd.exp_updowns)
into RS
from t_svc_ftb_detail asd
where instr(',' || replace(flight_ids, '/', ',') || ',',
',' || asd.flight_id || ',') > 0;
相当于 in( flight_ids) ,只是oracle并不支持 in( 查询结果集字符串 ) ,假设 flight_ids为 ‘aaa,bb,cc’