Checking for updated rows

  • In Andy Leonard's article "Adding Rows in Incremental Loads - Level 3 of the Stairway to Integration Services" he goes over adding 'Lookup' object and checking for modified rows. I decided to do some training... using our data.. and it generated an error due to the data type, in my table, was real. So just how do we test to see if the data has changed if we have a column that is real? Why will it not work on real data?

    The error...

    TITLE: Microsoft Visual Studio

    ------------------------------

    Cannot map the lookup column, 'New_Safety_Stock', because the column is set to a floating point data type.

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

  • dwilliscp (2/11/2013)


    In Andy Leonard's article "Adding Rows in Incremental Loads - Level 3 of the Stairway to Integration Services" he goes over adding 'Lookup' object and checking for modified rows. I decided to do some training... using our data.. and it generated an error due to the data type, in my table, was real. So just how do we test to see if the data has changed if we have a column that is real? Why will it not work on real data?

    The error...

    TITLE: Microsoft Visual Studio

    ------------------------------

    Cannot map the lookup column, 'New_Safety_Stock', because the column is set to a floating point data type.

    ------------------------------

    BUTTONS:

    OK

    ------------------------------

    You usually do a lookup on the PK of your table. Andy's article suggests something similar, I think: check whether a matching row exists (match on PK) - if it does, update it, otherwise, insert it.

    What the article does not do is check individual columns to see whether they have changed.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

  • I changed to PK, thanks. I will have to look back and see if he stated anything about using PK... I would not think that e-mail would be a PK, since folks tend to have more than one.

  • dwilliscp (2/11/2013)


    I changed to PK, thanks. I will have to look back and see if he stated anything about using PK... I would not think that e-mail would be a PK, since folks tend to have more than one.

    I will agree with that - but he does state that he has decided to match the first one he finds and update just that one row. In a way, that makes the e-mail column in the example effectively a PK.

    If you haven't even tried to resolve your issue, please don't expect the hard-working volunteers here to waste their time providing links to answers which you could easily have found yourself.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply