語句如下:
select * from Product_db.dbo.File_Publish_Tab where Bitem= '文件 ' and Fno= 'EW-101 ' and Fver < 'B ' and FrecY <> 'Y ';
不加and FrecY <> 'Y '則正確,爲什麽?
------解决方案--------------------------------------------------------
try
select * from Product_db.dbo.File_Publish_Tab where Bitem= '文件 ' and Fno= 'EW-101 ' and Fver < 'B ' and (FrecY Is Null Or FrecY <> 'Y ')
------解决方案--------------------------------------------------------
select * from Product_db.dbo.File_Publish_Tab where Bitem= '文件 ' and Fno= 'EW-101 ' and Fver < 'B ' and (FrecY <> 'Y ' or FrecY is null)