在sqlserver中有几个记录,里面表面上看上去什么都没有,但是在where column=''就是显示不出来那几个记录,说里面是什么?,如果是回车和制表符我都用replace(replace(column,char(10),'') ,char(13),'')去除了,但是还有那几个貌似是空格的记录还是查询不出来,请各位指点。

解决方案 »

  1.   

    where replace(column,' ','')=''
      

  2.   

    where column is not null
      

  3.   

    以上方法都不可以,我的数据类型是从ntext转换成cats(column as nvarchar(4000))的,我把那个空的记录放到记事本中,发现了好像有一个回车,还有我用ascii查看他们,那些地方显示null,但是用 column is not null还是不管用,为什么
      

  4.   

    --你把char(10),char(13),Null,' ',都排除掉不就可以了吗? 
    where replace(replace(replace(column,' ',''),char(10),''),char(13),'')=''
      

  5.   


    select   replace(cast(description as varchar(3333)),'" border="0" hspace="0" vspace="0" width="234" height="1">    ','') 
     from data_6
     where  web_url like 'http://www.stakich.com%'  and  cast(description as varchar(3333)) is not null这是我的那个语句,但是最后查询出来的,还有空的记录,难道我的sql有问题么
      

  6.   

    where  web_url like 'http://www.stakich.com%'  and  cast(description as varchar(3333)) is not null你的这句 cast(description as varchar(3333)) is not null 中'is not null'是表示该字段不是'未知值'.也就是说除了'未知值',你还要处理已知的char(10),char(13),' '等值
    --试这个
    where web_url like 'http://www.stakich.com%'  and  replace(replace(replace(cast(isNull(description,'') as varchar(3333)),' ',''),char(10),''),char(13),'')=''
      

  7.   

    我用len(column)<>0 这个把问题解决掉了,但是我很想知道我的那个方法为什么不可以呢,
    where column is not null 和where column<>''这些方法最后的结果都还是显示出了那个字段为空的情况。