22,209
社区成员
发帖
与我相关
我的任务
分享
SELECT * FROM WB_Form_Waiting_List T$_aaf3606a INNER JOIN WB_Form_FilePrint T$_23ac687e ON ((T$_aaf3606a.Form_Type = 'FilePrint') AND (T$_aaf3606a.Form_Guid = T$_23ac687e.GUID))
WHERE T$_aaf3606a.Form_Class <> 'Cancel'
AND (T$_23ac687e.Is_Pass <> '0' OR T$_23ac687e.Is_End <> '1')
AND ((T$_23ac687e.ValidEndTime IS NULL AND T$_23ac687e.RemainCount <> '0')
OR (T$_23ac687e.PrintCount = '0'
AND T$_23ac687e.ValidBeginTime < '2011-09-15 09:31:32.169'
AND T$_23ac687e.ValidEndTime > '2011-09-15 09:31:32.169')
OR (T$_23ac687e.PrintCount <> '0'
AND T$_23ac687e.RemainCount <> '0'
AND T$_23ac687e.ValidBeginTime < '2011-09-15 09:31:32.169'
AND T$_23ac687e.ValidEndTime > '2011-09-15 09:31:32.169')
)
)
;with ach as
(
select rn=row_number() over (order by getdate()),* from table1 left join table2 on ***
)
select *
from ach
where rn not in (select rn from ach where A and (B and (c or d or e)))
select * from table1 left join table2 on *** where not (A and (B and (c or d or e)))
select * from where true and true and (false or false or null)
select * from where true and true and (false or false or null)