17,086
社区成员
发帖
与我相关
我的任务
分享
or的方法我尝试过了,虽然查的出来,但是会有多条数据,因为不仅仅只有2个实施部门 [quote=引用 4 楼 u012393070 的回复:] [quote=引用 3 楼 IceIsabel 的回复:] 当然如果字段不多的话,可以用or
select t.newid id,
t.title,
t.name,
t.contact,
t.extensionnum,
t.telephone,
t.enforcementdepartments1,
t.contact1,
t.extensionnum1,
t.telephone1,
t.enforcementdepartments2,
t.contact2,
t.extensionnum2,
t.telephone2,
t.enforcementdepartments3,
t.contact3,
t.extensionnum3,
t.telephone3,
t.enforcementdepartments4,
t.contact4,
t.extensionnum4,
t.telephone4,
t.enforcementdepartments5,
t.contact5,
t.extensionnum5,
t.telephone5,
t.range,
code,
usernum,
accord,
t.newtype,
description,
starttime,
endtime,
newcontent,
subtitles,
bulletin,
ivr,
notes,
state,
creatcard,
creattime,
actualtime,
decode(mark, 1, '提前', 2, '延时', 3, '警告', 0, '正常') mark,
card,
operationtime,
stime,
etime,
newcontentb,
feedbackcard,
reviewer,
feedbacktime,
decode(newtypeb, 1, '审核', 2, '反馈', 3, '调整') newtypeb,
closecard,
closereason
from (select a.*,
b.*,
c.*,
a.id newid,
a.type newtype,
a.content newcontent,
b.content newcontentb,
b.type newtypeb,
row_number() over(partition by a.id order by a.creattime desc) r1
from network_checkin a, network_adjustlog b, network_department c
where a.id = b.id(+)
and a.enforcementdepartments = c.deptid) t
where r1 = 1
and name = '技术部'
or enforcementdepartments1 = '9'
or enforcementdepartments2 = '9'
or enforcementdepartments3 = '9'
or enforcementdepartments4 = '9'
or enforcementdepartments5 = '9'
order by t.creattime desc
or的方法我尝试过了,虽然查的出来,但是会有多条数据,因为不仅仅只有2个实施部门 [quote=引用 3 楼 IceIsabel 的回复:]
当然如果字段不多的话,可以用or
当然如果字段不多的话,可以用or