1

Topic: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

Kind time of days!
SQL Server 2016. I create a formatting file fmt such line
bcp Base_S.dbo.tbl_S format nul-c-t,-f C:\TC\S.fmt-T
Field delimiter the comma appears, but in one of fields there is a comma in field value, therefore field value is selected in inverted commas. That such to accept I the file fmt corrected hands adding in a separator ", \" "and" \",". All worked well, did not come yet to hands csv a file in which in this field that is inverted commas they are not present... It is possible to process such situation somehow?
Here a screen - http://prntscr.com/gufqay
In advance I thank for the help.

2

Re: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

is called.CSV - Comma Separated Volume.
BCP it does not support.
If a file of the moderate size and productivity not a principal problem - study OPENROWSET and the ODBC-driver for.CSV.
At MS the ODBC-driver is on-default.

3

Re: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

aleks222;
Support CSV appeared in 2017 versions.

4

Re: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

And through BULK INSERT with FORMATFILE in any way that-whether such cases not to process?

5

Re: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

MasSQL;
If CSV it was possible to flood, writing especially artful format a file what for it would be necessary to add format support in BCP / Bulk Insert?

6

Re: SQL Server. bcp. A formatting file. Inverted commas that is is not present... Whether it is possible to win somehow?

MasSQL wrote:

Kind time of days!
SQL Server 2016. I create a formatting file fmt such line
bcp Base_S.dbo.tbl_S format nul-c-t,-f C:\TC\S.fmt-T
Field delimiter the comma appears, but in one of fields there is a comma in field value, therefore field value is selected in inverted commas. That such to accept I the file fmt corrected hands adding in a separator ", \" "and" \",". All worked well, did not come yet to hands csv a file in which in this field that is inverted commas they are not present... It is possible to process such situation somehow?
Here a screen - http://prntscr.com/gufqay
In advance I thank for the help.

On the Internet there are everyones   which are able to inhaust Zarazn Th format (CSV)