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 |
|
yazasi
Starting Member
11 Posts |
Posted - 2008-10-17 : 01:00:45
|
| I'm using some tables where a specific colums have sometimes a blank or the word 'Null'. How can I pull data and exclude all rows where that specific field has a blank.- The WHERE Field_X IS NOT NULL statment is not helping as it pulls all rows with a blank value.Thanks. |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2008-10-17 : 02:12:19
|
| where isnull(Field_X,'') <> ''may help.WebfredPlanning replaces chance by mistake |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-17 : 02:15:02
|
The value 'null' (a string of 4 characters) or NULL value?WHERE NULLIF(NULLIF(Col1, 'NULL'), '') IS NULL E 12°55'05.63"N 56°04'39.26" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-10-17 : 03:58:00
|
| orWHERE Col1<>'NULL' and Col1<>''MadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-10-17 : 04:16:37
|
WHERE Col1 NOT IN ('NULL', '') E 12°55'05.63"N 56°04'39.26" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-10-17 : 05:51:02
|
quote: Originally posted by Peso The value 'null' (a string of 4 characters) or NULL value?WHERE NULLIF(NULLIF(Col1, 'NULL'), '') IS not NULL E 12°55'05.63"N 56°04'39.26"
MadhivananFailing to plan is Planning to fail |
 |
|
|
yazasi
Starting Member
11 Posts |
Posted - 2008-10-18 : 01:26:53
|
| Thanks guys. |
 |
|
|
|
|
|