Home Forums Data Warehousing Integration Services Best Approach For Iterating Through Staging Table - deleting/ignoring unwanted rows RE: Best Approach For Iterating Through Staging Table - deleting/ignoring unwanted rows

  • I don't believe the above approach will work because there could be multiple Acquired/Lost combinations for a single Auid (sorry, should have explained that in my original post). For example, the result of the query when run against the records in the screenshot I provided is:

    FirstAquireID=2

    LastLostID=34

    Auid=71127c4145a...

    What I ended up doing (and still have more testing to do), is use a modified version of the what was explained in this article: http://www.sqlservercentral.com/articles/T-SQL/68467/

    Using this method, I was able to flag and delete the unwanted rows from the staging table.