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 |
|
sross81
Posting Yak Master
228 Posts |
Posted - 2008-05-23 : 18:12:00
|
| I have a table that I know has a null or nothing in a field. When I run this query to get a list of them nothing comes back at all but it doesn't error out. Any ideas?select * from lab_test_add_confwhere table_name = null order by lab_test_conf_id |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-23 : 18:14:48
|
| where table_name is nullTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
sross81
Posting Yak Master
228 Posts |
Posted - 2008-05-23 : 18:16:23
|
| I tried where table_name is null and it didn't work either.I just got this to work:select * from lab_test_add_confwhere table_name = ' 'order by lab_test_conf_id |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-23 : 18:22:43
|
| Then your data does not have nulls in it.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
sross81
Posting Yak Master
228 Posts |
Posted - 2008-05-23 : 18:24:05
|
| Well its blank? Is a null and blank different? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-23 : 18:28:15
|
| Yes. One is a value and the other isn't.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
|
|
|