现在用SQL消除空的方法如下
  Sql = "Select A8 from [Sheet2$] "
  Sql = Sql & "Where A8 <> '' "
想用Empty函数消除记录中的空格或null
请问Empty或null在SQL的应用?

解决方案 »

  1.   

    Sql = "Select A8 from [Sheet2$] " 
      Sql = Sql & "Where not Isnull(A8) "OR:Sql = "Select A8 from [Sheet2$] " 
      Sql = Sql & "Where not isEmpty(A8)"  
      

  2.   

    'NULL作为条件查询时:
    sql=" select * from tablename where aa is NULL "        '查为NULL的记录
    sql=" select * from tablename where aa is not NULL "    '查不为NULL的记录
    'NULL作为赋值处理时:
    sql=" update set tablename set aa=NULL where ..."