Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS SQL Server - Export Results To File without "NULL"

I am using SQL Server Management Studio to export the results of my query to text. I would like to export the results without the character NULL being printed between delimiters.

For example, instead of:

,NULL, 

I would like to export:

,,

Thanks for your help

like image 607
hamel Avatar asked Jun 26 '13 14:06

hamel


Video Answer


1 Answers

Just simply use

ISNULL(someColumn, '')

in our query. This will replace all NULL values with an empty string

like image 168
marc_s Avatar answered Oct 24 '22 19:10

marc_s