I'm trying to mimic a csv data file using SQL Server. My replicated csv file is inserting double quotes in the fields where there's no value for that particular column. These double quotes aren't there in the original file I'm hoping to replicate. I do not have access to the SQL code running the original file (hence why I'm trying to replicate it).
The csv file I want to replicate looks like this:
First Name, Last Name, Emp ID, DOB, Address
John, Doe, a123,
Jane, Austin, b345
What I'm getting when I run SQL query:
First Name, Last Name, Emp ID, DOB, Address
John, Doe, a123, "", "",
Jane, Austin, b345, "", ""
I've tried this, but it's still inserting double quotes for the last two columns
SELECT [First Name], [Last Name], [Emp ID], DOB as null, Address as null
FROM Table
Not sure how to remove those pesky double quotes.