oracle三张表表内连接
程序员文章站
2024-03-30 22:27:45
select * from
(select a.title,a.openurl,to_char(b.noticetime / (1000 * 60 * 60 * 24) + TO...
select * from
(select a.title,a.openurl,to_char(b.noticetime / (1000 * 60 * 60 * 24) + TO_DATE('1970-01-01 ', 'YYYY-MM-DD '),'YYYY-MM-DD ') AS time
from view_oa_notice a inner join oa_info_notice b
on a.title=b.title inner join oa_info_notice_column c
on b.columnid=c.pkid and c.columnname=aa
and instr(','||a.bydepid||',',',1,')>0 or
instr(','||a.bydepid||',',','||00||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,3)||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,6)||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,9)||',')>0 or
a.recipientid like '%abc%') where rownum<=10
(select a.title,a.openurl,to_char(b.noticetime / (1000 * 60 * 60 * 24) + TO_DATE('1970-01-01 ', 'YYYY-MM-DD '),'YYYY-MM-DD ') AS time
from view_oa_notice a inner join oa_info_notice b
on a.title=b.title inner join oa_info_notice_column c
on b.columnid=c.pkid and c.columnname=aa
and instr(','||a.bydepid||',',',1,')>0 or
instr(','||a.bydepid||',',','||00||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,3)||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,6)||',')>0 or
instr(','||a.bydepid||',',','||substr(00,0,9)||',')>0 or
a.recipientid like '%abc%') where rownum<=10