Update 2 Tables at Once
Posted on 2012-08-24
I have a older asp program that I am rebuilding from scratch. The SQL database was origionally built about 16 years ago as well. What I need to do is to be able to update 2 tables at the same time. It's currently hosted on SQL2008r2. Here is my scenario:
TABLE 1: Client.ss# + Client.DOB = Client.CCID
TABLE 2: Activity.CCID
When a user updates a clients SS# or the Date of Birth in the first table, it updates the CCID as well. I need it to also update all of the activity records in the the second table where the old CCID was found to reflect the new CCID.
I am fairly new to this so I could use some help to accomplish this. Examples would be appreciated.
Thanks in advance!