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 |
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2012-01-10 : 07:51:31
|
| Hi, How do I check which records in a table have all NULL columns,I would like to think I dont have to perform:select * from table where col1 is NULL and col2 is NULL ETC.etc. Thank you :) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-01-10 : 07:54:05
|
that is the best way of doing it. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
tariq2
Posting Yak Master
125 Posts |
Posted - 2012-01-10 : 08:02:58
|
| Okay, thank you |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-01-10 : 09:36:02
|
| Where coalesce(col1,col2,...,colN) is nullMadhivananFailing to plan is Planning to fail |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-01-10 : 09:44:52
|
coalesce will work provided that all are of same data type KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
|
|
|