Why can I not import csv file into my SQL Server database?

0

I have SQL Server 2008 R2 on the my server, and I have this table:

CREATE TABLE [dbo].[rptost]
(
    [ID_ost] [tinyint] NOT NULL,
    [id_rpt_ost] [int] IDENTITY(1,1) NOT NULL,
    [id_rptost_q] [int] NOT NULL,
    [usrid] [smallint] NOT NULL,
    [Confirm_id] [smallint] NOT NULL,
    [date_] [int] NOT NULL,
    [time_] [int] NOT NULL,
    [date_create] [int] NOT NULL,
    [time_create] [int] NOT NULL,
    [date_read] [int] NOT NULL,
    [time_read] [int] NOT NULL,
    [usrid_create] [int] NOT NULL,
    [sycl] [smallint] NOT NULL,
    [report_type] [smallint] NOT NULL,
    [activity_no] [int] NOT NULL,
    [tedad] [int] NOT NULL,
    [price_sycl] [bigint] NOT NULL,
    [zarib] [int] NOT NULL,
    [price_year] [bigint] NOT NULL,
    [price_moavaq] [bigint] NOT NULL,
    [price_recoverable] [bigint] NOT NULL,
    [price_nonrecoverable] [bigint] NOT NULL,
    [effect_company] [nvarchar](50) NOT NULL,
    [effect_subcrib] [nvarchar](50) NOT NULL,
    [result_] [bigint] NOT NULL,
    [Financial_] [bigint] NOT NULL,
    [id_incom] [int] NOT NULL,
    [id_risk] [tinyint] NOT NULL,
    [desc_] [nvarchar](max) NOT NULL,
    [desc_analyz] [nvarchar](max) NOT NULL,
    [desc_modify] [nvarchar](max) NOT NULL,
    [desc_action] [nvarchar](max) NOT NULL,
    [desc_return] [nvarchar](max) NULL
)

I run this query on the server:

select top 5 * from rptost

and right click on the result and save into server desktop, that server SQL Server collation is this:

Polish_100_BIN

On the other side, I have SLQ Server 2014 on my client pc, I want import that csv file into my client database with sql server import wizard, but I get this error in import wizard:

Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "x29" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
(SQL Server Import and Export Wizard)

How can I solve that problem? Thanks to everyone.

sql-server
sql-server-2008-r2
sql-server-2014
asked on Stack Overflow May 30, 2016 by behzad razzaqi • edited May 30, 2016 by marc_s

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0