Error File Creation | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Error File Creation

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.
Can you specify what was that error? Satya SKJ
Microsoft SQL Server MVP
Contributing Editor & Forums Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing.
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
insert into #test
select ‘aaaaaa’ select * from #test
Mohammed U.