Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I newbie to SQL Server Integration Services and I have a problem:

Data loaded from file looks like this:

1 'a' 'b'
2 'a' 'b'
1 'c' 'd'

And this rows would be loaded in table like this:

CREATE TABLE T (
   ID NOT NULL PRIMARY KEY,
    A nvarchar NOT NULL,
    B nvarchar NOT NULL
); 

Cause of ID is primary key third row in input data could not be loaded, and I want to load correct rows (first and second or third and second) and send to log incorrect row.

share|improve this question
there are two ways... a) Remove primary key ..make as ID Not Null (b) Concatenate the values and then insert i.e. 1 'a,c' 'b,d' 2 'a' 'b' – Niladri Biswas Oct 25 '12 at 8:57
@Niladri There are a fixed table structure. – user1733773 Oct 25 '12 at 9:00
then 2nd option will work..Concatenate the values and then insert i.e. 1 'a,c' 'b,d' 2 'a' 'b' – Niladri Biswas Oct 25 '12 at 10:17

migrated from stackoverflow.com Oct 25 '12 at 11:24

1 Answer

Check this: ETL SSIS : Redirecting error rows to a seperate table

It has all the steps you need to have the error records stored somewhere else.

share|improve this answer
Exactly what I would have recommended. – Simon Osborne Jan 24 at 9:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.