如果参数值或单元格值为空,如何进行空值检查
--Update into BudCustomers from Bulk
Update BudCustomers
set BudCustomers.ImportedRecord = ImportedRecord
,BudCustomers.VersionID = @VersionId
,BudCustomers.STATUSID = @StatusId
FROM BudCustomers BCUST
JOIN External_Blk_Itm_Contracts EBIC ON BCUST.LegalName = EBIC.CustomerName
Where BCUST.ImportedRecord <> @ImportedRecord
OR BCUST.STATUSID <> @StatusId
答案 0 :(得分:1)
Where ((BCUST.ImportedRecord <> @ImportedRecord) OR (BCUST.ImportedRecord IS NULL AND @ImportedRecord IS NULL))
然后是其他列/参数对的相同模式。