表中有一个字段meetingdate,如何来检索出所有这个表中meetingdate字段包含在一个字符串中的数据。
如:meetingdate如下
Aug1
Sep3
Aug2
Nov6
Set9
检索出上面值包含在字符串"Set3,Nov6,Aug2"中的数据

解决方案 »

  1.   


    scott@YPCOST> ed
    已写入 file afiedt.buf  1  with tb as(
      2  select 'Aug1' meetingdate from dual union all
      3  select 'Sep3' from dual union all
      4  select 'Aug2' from dual union all
      5  select 'Nov6' from dual union all
      6  select 'Set9' from dual)
      7* select * from tb where instr('Set3,Nov6,Aug2',meetingdate)>0
    scott@YPCOST> /MEET
    ----
    Aug2
    Nov6
      

  2.   


    select * from tb where instr('Set3,Nov6,Aug2',meetingdate)>0
      

  3.   

    试一下:
    where 'Set3,Nov6,Aug2' like meetingdate || '%'
      

  4.   


    少了一块
    where 'Set3,Nov6,Aug2' like '%' || meetingdate || '%'