Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11

    Unanswered: import data into sqlserver

    sql server 2012
    db with table article
    CREATE TABLE
    [dbo].[article]
    (
    [id] bigint IDENTITY NOT NULL,
    [ticket_id] bigint NOT NULL,
    [article_type_id] smallint NOT NULL,
    [article_sender_type_id] smallint NOT NULL,
    [a_from] nvarchar(max) NULL,
    [a_reply_to] nvarchar(max) NULL,
    [a_to] nvarchar(max) NULL,
    [a_cc] nvarchar(max) NULL,
    [a_subject] nvarchar(max) NULL,
    [a_message_id] nvarchar(max) NULL,
    [a_in_reply_to] nvarchar(max) NULL,
    [a_references] nvarchar(max) NULL,
    [a_content_type] nvarchar(max) NULL,
    [a_body] nvarchar(max) NOT NULL,
    [incoming_time] int NOT NULL,
    [content_path] nvarchar(max) NULL,
    [valid_id] smallint NOT NULL,
    [create_time] nvarchar(max) NOT NULL,
    [create_by] int NOT NULL,
    [change_time] nvarchar(max) NOT NULL,
    [change_by] int NOT NULL
    )
    using tasks-import csv delimited file | as column separator and " to close text fields
    having this in input field :
    "<2.1.4.1101032943.1730599.4859788612@news.comptoi r-de-wagram.com>"
    when importing this I get
    Messages
    Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 10" 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)
    Error 0xc020902a: Data Flow Task 1: The "Source - otrs_csv.Outputs[Flat File Source Output].Columns[Column 10]" failed because truncation occurred, and the truncation row disposition on "Source - otrs_csv.Outputs[Flat File Source Output].Columns[Column 10]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
    (SQL Server Import and Export Wizard)
    it is for the correct column because if replacing text with "" it is imported
    nvarchar(max) has no limit - so why truncation error ?
    thanks for all help/update
    Best Regards, Guy Przytula
    Database Software Consultant
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    I would bet it is not your table structure causing the truncation but the meta data inside your SSIS package.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •