将真值转换为假值 [英] converting true value to false
本文介绍了将真值转换为假值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我有以下情况
................. query
hi guys
i have following situation
.................query
INNER JOIN T_Line L ON L.FK_Line_Master = TPLA.FK_Line_Master
OR
(L.ValidFrom <= TPLA.ValidFrom AND TPLA.ValidUntil<= ISNULL(L.ValidUntil, DATEADD(year,100, GETDATE())))
但是在这个OR运算符中,我想获取不满足此条件的记录(与此条件相反)
如目前,这将获取满足该条件的记录.
有帮助吗?
but in this OR operator i want to get records where this condition is not true (means opposite of this ciondition)
as currently this will fetch records where this condition will be true .
any help ?
regards.
推荐答案
尝试使用NOT:
Try using NOT:
INNER JOIN T_Line L ON L.FK_Line_Master = TPLA.FK_Line_Master
OR
NOT (L.ValidFrom <= TPLA.ValidFrom AND TPLA.ValidUntil<= ISNULL(L.ValidUntil, DATEADD(year,100, GETDATE())))
您可以使用NOT运算符 [
You can use the NOT operator[^]:
... OR NOT ( ... )
这篇关于将真值转换为假值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文