Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
wangyc77
Yak Posting Veteran
65 Posts |
Posted - 2007-02-13 : 07:25:34
|
| I have a field of type [ntext] and I tried the following SQL to disply rows that are not empty(they are either empty or Null field)TABLE sid int, Etinfo ntextselect sid, Etinfo from jhdata where Etinfo IS NOT NULL==>Doesnt work, empty field rows still show upselect Etinfo from jhdata where Etinfo <>'' ==>ERROR Occursselect Etinfo from jhdata where LEN(Etinfo )>0==>ERROR OccursPlease advise how to display rows whose Etinfo is empty or NULL in SQL 2k**Jonathan** |
|
|
khalik
Constraint Violating Yak Guru
443 Posts |
Posted - 2007-02-13 : 07:49:28
|
| select sid, Etinfo from jhdata where cast(Etinfo as varchar(10)) IS NOT NULL======================================Ask to your self before u ask someone |
 |
|
|
wangyc77
Yak Posting Veteran
65 Posts |
Posted - 2007-02-14 : 02:00:27
|
| Thanks a lot duke**Jonathan** |
 |
|
|
|
|
|