From the course: SQL Server Integration Services
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Prevent duplicate records - SQL Server Tutorial
From the course: SQL Server Integration Services
Prevent duplicate records
- [Instructor] Before we call this data flow complete, we need to think through what happens if you run it multiple times. The destination component is simply writing records to an existing table in the Kinetico database. In this regard, it's acting like an insert into query, where records are simply being added to what's already there. If you run this data flow multiple times, for instance, by pressing the start button, then you're going to wind up with duplicate records in the tables. Let's take a look back inside of management studio and I'm going to take a look inside of the SampledCustomers table again. This time I'll select top 1000 rows and you'll see that it's now returning 219 rows, where previously we had 108. At this point, we have two copies of every single record in this table. That's probably not the ideal situation that you were looking for. So, we need to go back into Visual Studio and make a change to our work flow. One way that we can deal with this is by truncating…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Data flow components1m 49s
-
(Locked)
Extracting data from a source5m 43s
-
(Locked)
Understand transformations1m 15s
-
(Locked)
Character Map row transformation3m 50s
-
(Locked)
Conditional Split transformation5m 3s
-
(Locked)
Rowset transformations2m 25s
-
(Locked)
Loading data to a destination5m 37s
-
(Locked)
Prevent duplicate records2m 52s
-
(Locked)
-
-
-