Question

I need to parse a flat file which is containing backspace (^H) character delimiter between fields. I need to parse this file and insert into sql server 2005 tables.I tried to use bcp utility along with the format file but I wasn't able to specify the delimiter as backspace. The default one is tab (\t). There are several other delimiters as well but none to specify backspace. Anyone has any ideas, please do help me.

Also I need to export data from sql server table to fixed length flat file.I tried to use non-xml format file, but always it asks for a delimiter.How can I create a flat file using bcp without any delimiter between the fields? All above are character files.

Was it helpful?

Solution

This is an ugly workaround, but you could always find something that's not in the flat file, and replace everything in the flat file with that, then use that as the column terminator (using bcp -t that).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top