adworldmedia
asked on
T-SQL UPDATE QUERY - update table from another table based upon relationshp?
I'm storing affiliate records in a table ('affiliaterecords') on Microsoft SQL Server 2005, and each record generates a unique INT ID number that is used as the primary key. Also a field named 'email'
I have another table called 'logins', which stores a login name, password, and related account ID's.
I want to run an UPDATE query that pulls (based upon a reltaionship with the e-mail address field) the affiliaterecord ID field and inserts it into the 'logins' table's column named 'affiliateid' based upon a match on the email address which is in each table....
I hope this makes sense! Thanks
I have another table called 'logins', which stores a login name, password, and related account ID's.
I want to run an UPDATE query that pulls (based upon a reltaionship with the e-mail address field) the affiliaterecord ID field and inserts it into the 'logins' table's column named 'affiliateid' based upon a match on the email address which is in each table....
I hope this makes sense! Thanks
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.