|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 9:52 AM
Points: 187,
Visits: 332
|
|
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 ------------------------------
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
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.
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Tuesday, May 14, 2013 9:52 AM
Points: 187,
Visits: 332
|
|
| 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.
|
|
|
|
|
SSCarpal Tunnel
       
Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,242,
Visits: 9,494
|
|
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.
____________________________________________________________________________________________
Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
|
|
|
|