(fieldname is not null) and (fieldname <> '')

解决方案 »

  1.   

    text ntext image 不支持 <> '' 或 = ''服务器: 消息 306,级别 16,状态 1,行 1
    不能比较或排序 text、ntext 和 image 数据类型,除非使用 IS NULL 或 LIKE 运算符。
      

  2.   

    可以尝试在程序中使用错误控制试一下在VB中为例:
    on error goto errdesif len(rs("textname")) then
    else
        'text 不为null,但为''
    end iferrexit:
        exit sub
    errdes:
        if err.number="the error number" then '表示text为null,具体的数目不记得了,但是可以查到
        else 
        end if
        resume errexit
      

  3.   

    try:
    where (fieldname is not null) and (len(fieldname) =0 )
      

  4.   

    用DATALENGTH函数,这个函数可以显示任意类型的数据的长度SELECT * FROM TABLENAME WHERE DATALENGTH(ISNULL(TEXTPTR(你的TEXT自字段名),'H'))=0TEXTPTR函数是判断TEXT等大型数据类型的指针的,用ISNULL去掉那些为NULL的纪录。