SQL Server Performance

Error File Creation

Discussion in 'SQL Server 2005 Integration Services' started by richjthorpe, Nov 3, 2006.

  1. richjthorpe New Member

    Hi all,

    I've set up a transformation that takes a flat file and inserts the rows in to a staging table. Each column in the staging table is string 50.

    From the transformation, I've linked a flat file destination for errors (red arrow) and selected every row as "Redirect Row" for errors and truncation.

    In the source flat file, I entered a field with 51 characters and when I ran the script, it found the truncation but stopped and didn't write the row to the error file. The Error gets created with a header but nothing else.

    Have I missed something ? I've followed online tutorials but it doesn't work.

    Cheers,

    Richie.
  2. satya Moderator

    Can you specify what was that error?

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided AS IS with no rights for the sake of knowledge sharing.
  3. MohammedU New Member

    May be "SET ANSI_WARNINGS" option is OFF, if it is ON you get the error.

    create table #test ( id Varchar(2))

    SET ANSI_WARNINGS ON
    insert into #test
    select 'aaaaaa'
    select * from #test
    go
    SET ANSI_WARNINGS Off
    insert into #test
    select 'aaaaaa'

    select * from #test


    Mohammed U.

Share This Page