agstudy / rsqlserver

Sql Server driver database interface (DBI) driver for R. This is a DBI-compliant Sql Server driver based on the System.Data.SqlClient.
82 stars 30 forks source link

Commas inside fields #25

Closed ruaridhw closed 7 years ago

ruaridhw commented 8 years ago

Saw PR #18 which helped solve my first issue however as mentioned by @wibeasley those quotes are used as text qualifiers for a field which contains commas. Regardless of whether quote=T or F the data still gets uploaded with the comma in that field being interpreted as a separator.

I've tried playing around with sep = " " however since write.csv is called this gets ignored. Is there any way to fix this by passing a certain argument or forcing write.table to be called instead?

PS Amazing package! Thank you so much for this.

Edit Realised this is a known issue with bcp and bulk insert in sql server. Could any of the suggested solutions end up working with rsqlserver? As a workaround I can edit the fields that contain commas but it would be preferable to change the delimiter rather than tamper with the data