I have writing a script to export a table data in CVS file, i have handled the null values by using select @fieldname = isNull(@fieldname , ''); replace all null values by space, but this does not work , the resultant cvs file does contain some box like char in the output file, when opening the file in notepad++ Nul char is displayed where as if i open the file in MS excel then it is not displayed
How do i get ride of this char while extracting the data.
@fieldname would normally be a variable with named fieldname, but I guess that is a typo. To the point: isnull(field,'') works brilliant, so my conclusion would be that something else is wrong. If you write dynamic SQL, remember that you should write isnull(field,'''') instead. Otherwise, I my best call is an error in your script, most likely that it does not handle empty strings correctly.