SQL Server 2012:子查询返回了多个值

时间:2018-03-05 10:58:26

标签: sql-server-2012

以下是其创建的动态查询:

Update form.CP_DEMOG
set
    [field_id] = '1984',
    ChangeReason= 'Initial',
    ModifiedBy = 'usr1',
    ModifiedDate=GETDATE(),
    status = (CASE WHEN status=0 or status is null or status=7 THEN 1 else status END)
where id = 17 and coalesce(status,0) <> 8

但是我收到了这个错误:

  

子查询返回的值超过1。当子查询遵循=,!=,&lt;,&lt; =,&gt;,&gt; =或子查询用作表达式时,不允许这样做。

我无法找到它返回多一个值的位置。

0 个答案:

没有答案