--ACCESS中select iif(isnull(字段),0,字段) from 表

解决方案 »

  1.   

    --SQL Server中
    select isnull(字段,0) from 表
      

  2.   

    邹老大,有没有不用输入每一个字段名的办法?按您说的这样做,和我这样相差不多啊update 表 set 字段=0 where 字段 is null
    update 表 set 字段1=0 where 字段1 is null
    ……
      

  3.   

    如果是字符串類型數據access 2000
    select iif(isnull(字段),"",字段) from 表sql server2000
    select isnull(字段,'') from 表
      

  4.   

    先用update更好﹐因為isnull()函數轉換時﹐會影響查詢速度好多
      

  5.   


    update tablename set col1=nz(col1,0),col2=nz(col2,0),col3=nz(col3,0) ......
      

  6.   

    没有,要么更新,要么用isnull处理
      

  7.   

    --更新那不简单吗?--ACCESS中用
    update 表 set 字段=0 where isnull(字段)--SQL Server中用
    update 表 set 字段=0 where 字段 is null
      

  8.   

    to  victorycyz(中海)有這樣的函數nz()嗎﹖
      

  9.   

    没有直接更新整表的nz好像 access2000 及以上才支持吧
      

  10.   

    select name from syscolumns where id=object_id('表名')不能不这里用的吧
      

  11.   

    zjcxc(邹建) , nz()在access97里就有的。