SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Checking other 5 other columns for change and if they have set field null


Checking other 5 other columns for change and if they have set field null

Author
Message
Lempster
Lempster
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3185 Visits: 1657
Phil Parkin (4/4/2014)
Lempster (4/4/2014)
You could also use a 3rd party custom component such as the Checksum component from Konesans to calculate and store a checksum for the five address columns you are interested in and then compare the checksum of the source columns to the checksum of the destination columns; if the checksum values are different then at least one of your source columns has changed.

Disclaimer: I am not connected to Konesans in any way.

Regards
Lempster


This is a good solution. For good performance, you should consider persisting the checksum as a new column in the target table(s).


Absolutely Phil, hence I stated '..calculate and store...';-)

Lempster
Phil Parkin
Phil Parkin
SSCoach
SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)SSCoach (18K reputation)

Group: General Forum Members
Points: 18242 Visits: 20401
Lempster (4/4/2014)
Phil Parkin (4/4/2014)
Lempster (4/4/2014)
You could also use a 3rd party custom component such as the Checksum component from Konesans to calculate and store a checksum for the five address columns you are interested in and then compare the checksum of the source columns to the checksum of the destination columns; if the checksum values are different then at least one of your source columns has changed.

Disclaimer: I am not connected to Konesans in any way.

Regards
Lempster


This is a good solution. For good performance, you should consider persisting the checksum as a new column in the target table(s).


Absolutely Phil, hence I stated '..calculate and store...';-)

Lempster



I should have read your post more carefully! The lure of the Friday-afternoon beer is already proving distracting Exclamation


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Lempster
Lempster
Hall of Fame
Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)Hall of Fame (3.2K reputation)

Group: General Forum Members
Points: 3185 Visits: 1657
Koen Verbeeck (4/4/2014)
Lempster (4/4/2014)

....but...the OP specifically stated that they didn't want to go down the scripting route. ;-)


Yeah, but c'mon, all the c# code is already in the article Smile


:-D I know, but then again there is something to be said for 'if you don't know how something works, don't use it (in Production)' or words to that effect.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search