两张表 tbl_data (id num,data_name varchar2) tbl_event(id num,business num)
tbl_event 表中的存储数据:12, 或者 12,32, 或者 为 null select case when business is null
then '无'
else
(select data_name from tbl_data where id in
(select substr(business,1,(select length(business) from tbl_event a where a.no=b.no)-1)from tbl_event b
where b.no=c.no)
)
end as business
from tbl_event c where rownum<25tbl_data 为字典表,数据固定 ,tbl_event 中的数据为 上万条,但如果把 where rownum <25去掉的话,或者 25改为 25以上的话,就提示无效 数据
tbl_event 表中的存储数据:12, 或者 12,32, 或者 为 null select case when business is null
then '无'
else
(select data_name from tbl_data where id in
(select substr(business,1,(select length(business) from tbl_event a where a.no=b.no)-1)from tbl_event b
where b.no=c.no)
)
end as business
from tbl_event c where rownum<25tbl_data 为字典表,数据固定 ,tbl_event 中的数据为 上万条,但如果把 where rownum <25去掉的话,或者 25改为 25以上的话,就提示无效 数据
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货