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 |
|
funk.phenomena
Posting Yak Master
121 Posts |
Posted - 2011-05-19 : 23:06:31
|
| Hi All -I have a query that outputs the results to the grid.I will either copy and paste the results into Excel, or I will save the result set as a CSV file.How can I have all the NULL values display as blank values, rather than with the 'NULL' text?Thanks!!!! |
|
|
joshherman
Starting Member
13 Posts |
Posted - 2011-05-19 : 23:17:44
|
use condition in field value.for example :select case when column1 is null then '' else column1 end as colresult from table and when you run this, you will not get NULL valueprogramming |
 |
|
|
funk.phenomena
Posting Yak Master
121 Posts |
Posted - 2011-05-19 : 23:20:12
|
| Thanks for your response, however I have about 25 SELECT statements combined with cases/coalesce statements.Any alternatives? |
 |
|
|
MichaelJSQL
Constraint Violating Yak Guru
252 Posts |
Posted - 2011-05-21 : 14:25:20
|
| This should workSelect isnull(column1,'') as column1 from sometable |
 |
|
|
jfarrugia
Yak Posting Veteran
55 Posts |
Posted - 2011-05-23 : 08:01:35
|
| isnull(column, '') for text isnull(column, 0) for numericWhere software development knowledge meets the reader |
 |
|
|
|
|
|