既然已经用了isnull(),就不需要case ... when ... end了:
---------------------------------------------------------------------------------------------------------------------------------
'update t_storage set willoutnum=isnull(willoutnum,0)+'+S_num+' where cinvgg='''+e_cinvgg.Text+''' and cinvname='''+cmb_cinvname.text+''' and cinvpp='''+cmb_cinvpp.Text+''' and address='''+cmb_address.Text+''''

解决方案 »

  1.   

    'update t_storage set willoutnum=isnull(willoutnum,0)+'+S_num+' where cinvgg='''+e_cinvgg.Text+''' and cinvname='''+cmb_cinvname.text+''' and cinvpp='''+cmb_cinvpp.Text+''' and address='''+cmb_address.Text+''''---满足条件记录中的willoutnum为空时更新为0
      

  2.   

    反正语句有点累赘,楼上正解,如果上面的end再往后面,就是另外一个意思
      

  3.   

    update t_storage set willoutnum=case isnull(willoutnum,0) when 0 then 0 else willoutnum end+'+S_num+
                                    ' where cinvgg='''+e_cinvgg.Text+''' and cinvname='''+cmb_cinvname.text+''' and cinvpp='''+
                                    cmb_cinvpp.Text+''' and address='''+cmb_address.Text+'''' 询问 when 0 then 0 else willoutnum end 含义
      

  4.   

    询问 when 0 then 0 else willoutnum end 含义意思就是当字段 willoutnum 的值为空的时候,以0显示,否則就以原值輸出显示.