关于多表相联时当表未审核时不显示的问题
SELECT Pi.PiNO, Pi.Date, Pi.InureDate, InCase.Date AS DeliveryDate, Pi.Amount,
PayMent.PayMentName, OrderProfilt.Date AS Expr1, OrderProfilt.Rate,
Pi.Amount * OrderProfilt.GrossRate AS SumGross, OrderProfilt.GrossRate
FROM OrderProfilt RIGHT OUTER JOIN
Pi ON OrderProfilt.PiNO = Pi.PiNO LEFT OUTER JOIN
PayMent ON Pi.PayMentID = PayMent.PayMentID LEFT OUTER JOIN
InCase ON Pi.PiNO = InCase.PINO
WHERE (1 = 1) AND (OrderProfilt.IsAuditing = 1) AND (InCase.IsAuditing = 1)
这条语句当incase 和orderprofilt的isauditing=0时,连pi都不能显示了,我是想incase和orderprofilt未审核时,只显示pi的表不显示他们的表
除了用case语句验证外,有没有办法让这两个表做完自身筛选再绑定
[解决办法]
WHERE (1 = 1)
不能去掉吗??