select * from where titi in( select eplace() ) 的使用,球解救

yghuaa 2015-09-12 03:22:16
我要查找一个集合,单独执行select ''''||replace(Ztdoc,',',''',''')||'''' as urls from sl_hot_sport t where t.Htype='164' and t.id=46,这句会得到'201509/11/121.png','201509/11/add.png','',
如果将这个结果放到语句select e.title, e.fileurl from ss_feature_document e
where e.fileurl in ('201509/11/121.png','201509/11/add.png',''),里是能得到数据的,但是如果这两句结合后。如下
就得不到数据了,求解该怎么办??
select e.title, e.fileurl from ss_feature_document e
where e.fileurl in (select ''''||replace(Ztdoc,',',''',''')||'''' as urls from sl_hot_sport t where t.Htype='164' and t.id=46)
...全文
161 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
yghuaa 2015-09-13
  • 打赏
  • 举报
回复
引用 1 楼 wmxcn2000 的回复:
你查出来的是一个记录,用 in 操作,相当于使用 = 比较符, 你这里要使用 instr 函数。 instr((select .....) , e.fileurl ) > 0 这样的语法, 中间那个 select 是你那一长串 select ... replace 。。
很感谢 ,你说的方法可行
mayanzs 2015-09-13
  • 打赏
  • 举报
回复
select e.title, e.fileurl from ss_feature_document e where exists (select 1 from (select ''''||replace(Ztdoc,',',''',''')||'''' as urls from sl_hot_sport t where t.Htype='164' and t.id=46) f where f.urls=e.fileurl);
卖水果的net 2015-09-12
  • 打赏
  • 举报
回复
你查出来的是一个记录,用 in 操作,相当于使用 = 比较符, 你这里要使用 instr 函数。 instr((select .....) , e.fileurl ) > 0 这样的语法, 中间那个 select 是你那一长串 select ... replace 。。

17,137

社区成员

发帖
与我相关
我的任务
社区描述
Oracle开发相关技术讨论
社区管理员
  • 开发
  • Lucifer三思而后行
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧