I have this BCP command:
\'bcp DBName..vieter out c:\\test003.txt -c -T /t\"\\\",\\\"\" -S SERVER\'
The output CSV I get does not put quotes ar
I guess your goal was to clearly seperate field values by using an unique identifier so that import procedure doesn't have an issue.
I had same issue and found this workaroud useful: Using an unusual field terminator, for example |
or even a string /#/
can be very unique and shouldn't mess with your string content. You also can HEX-Values (limited, see https://docs.microsoft.com/en-us/sql/tools/bcp-utility?view=sql-server-2017)
export
bcp DB.dbo.Table out /tmp/output2.csv -c -t "/#/" -U sa -P secret -S localhost
import
bcp TargetTable in /tmp/output2.csv -t "/#/" -k -U sa -P secret -S localhost -d DBNAME -c -b 50000