How to prevent loading same data again into SQL Server destination?

Hi guys,

I am new to SSIS and trying to learn through examples. I recently tried this simple example where I have an OLEDB source and am transferring data to flat file, CSV file and SQL Server destination. I ran this 7-8 times, but everytime I ran it, same data got loaded again and again into SQL Server. First time I ran the package, 115 rows of data got loaded into different destinations. CSV file and flat file  didn,t get loaded again after the first package execution.My question are as follows;
1)How do I prevent from loading same old data into SQL Server destination?
2)CSV file has col A n B. col A has string data which spills into colB as shown in the attached file. Some of col B numeric data got pushed to col C. I want all col A and B data in their respective columns.

Who is Participating?
TempDBAConnect With a Mentor Commented:
#1. You can keep a check in the insert statement while loading data into sql server. For e.g.
          insert into abc_tbl
          select * from abc1_tbl t1
          where not exists (select 1 from abc_tbl t2 where t1.primarykey = t2.primarykey)

#2. What is the datatype and datalength for the column. Check the delimiter whether that is bringing the data into another column.
techEverestAuthor Commented:
Sorry for the delay. I was away for holiday.Thanks for the quick feedback.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.