I have a SQL Server table with nvarchar type column which has not null
constraint. I am inserting empty string ("") from Java to the table
column. When I export this table into .csv file using bcp tool, empty
string gets written as NUL character. Is there any way I can bcp out
empty string as empty string itself instead of NUL to the file?
The bcp command I used to export table into csv file is
bcp "SELECT skillID,profileID,skillName,active,dateInactive from
db_cra..Skill" queryout C:\Skill.csv -w -S 10.76.253.70\CRSSQL -t"," -
T
In the table skillName column can have empty string value.
Corresponding to the empty string csv file contain 'NUL' stored in it.
I do not want 'NUL'. I need empty string in the resulting file.
Is there any way it can be done?
Thanks
Jayaraj