I
I
Ivan2017-02-03 08:22:09
Asterisk
Ivan, 2017-02-03 08:22:09

Why doesn't MSSQL read csv from Asterisk?

Good afternoon.
A csv file was generated from the asterisk. In mssql, I'm trying to write it to a temporary table as usual

CREATE TABLE #Ankets (card_number varchar(max),
name varchar(max),
phone varchar(max),
email varchar(max))
BULK INSERT #Ankets
FROM 'E:\calls-20170118.csv'
WITH
(
FIRSTROW = 2,
FIELDTERMINATOR = ',', --CSV field delimiter
ROWTERMINATOR = '\n', --Use to shift the control to next row
ERRORFILE = 'E:\qqqserror.csv',
TABLOCK
)

But the result is null. If I open this file in Excel 2007 and immediately save it, the data is transferred to the school. How to overcome this trouble?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
silverjoe, 2017-02-03
@silverjoe

Encoding and line breaks are different

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question