更新不适用于条件

时间:2015-11-18 15:40:32

标签: sql-server

我正在尝试更新BudCustomers.ImportedRecord Column和BudCustomers.STATUSID列。这两列的数据是1和1.所以我试图更新为0,但这不适用于以下查询

   --Update into BudCustomers from Bulk
Update BudCustomers
 set    BudCustomers.ImportedRecord = 0
       ,BudCustomers.VersionID = 1
       ,BudCustomers.STATUSID = 0
       ,BudCustomers.LastModifiedUserID = 'Import'
       ,BudCustomers.LastModifiedDate = GETDATE()
FROM BudCustomers BCUST WITH(NOLOCK)
Where ((BCUST.STATUSID <> 1)
    OR (BCUST.ImportedRecord <> 1)) AND BCUST.LegalName = 'Test, LTD. (1000)'

1 个答案:

答案 0 :(得分:2)

根据您的描述,这可能就是您想要的。

std::uint16_t