I have exported a table to a comma-delimited text file, where the values are enclosed in quote marks and separated by commas. Some of my fields in some records are empty, so I get an empty string enclosed in quotes. Here’s what I should be getting:
“data1″,”data 2″,””,”data 4″,””,”data6″
Notice that data3 and data 5 are empty, but there are still placeholders for where the data should be. Just as expected.
One of the fields (and always the same field), however, drops the quotes around the placeholder when the field is empty. When this happens, I get this:
“data1″,”data 2″,””,”data 4″,,”data6″
Notice that data3 and data5 are still empty. Data5 has no quote marks around the empty string, but data3 is formatted correctly. When the field is populated with a value, the value is formatted correctly. I have examined both fields and find nothing out of the ordinary. All fields in the table I am exporting are text fields. All have the exact same properties. I am using the text file to import the data to another application, which requires a precise format. Does this problem sound familiar to anyone?