powershell -NoProfile_)Import-DbaCsvToSql -SqlInstance SRV1 -Database DB1 -Table tblFin -Delimiter ';' -Path E:\CVSFiles\1.csv
field1;field2;field3
abbcc;bbccdd;"ccddee
Imports CSV file w/o errors
WARNING: [xx:xx:xx][Import-DbaCsv] Failure | The CSV appears to be corrupt near record '498663' field '3 at position '0'. Current raw data : 'N'.
Actually, that line contains a single double quote character ".
hey oleg,
right off, that seems like malformed data to me and the parser but! I just added TrimmingOption to the branch in PR #4881 - try that and see if it helps
K i got it working with another option
gci E:\csv\zh.csv | Import-DbaCsv -SqlInstance sql2017 -Database tempdb -AutoCreateTable -Delimiter ';' -Quote $null
This will be available in the next release, due out today 馃憤馃巹
Thank you so much!!!
Most helpful comment
K i got it working with another option
gci E:\csv\zh.csv | Import-DbaCsv -SqlInstance sql2017 -Database tempdb -AutoCreateTable -Delimiter ';' -Quote $nullThis will be available in the next release, due out today 馃憤馃巹