Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update column A in table A if table A's column b = table b's column b. 3

Status
Not open for further replies.

kev510

Programmer
Jul 12, 2006
61
Hi everyone. I couldn't sum my question into the subject line. But I'm sure the subject got you opening my thread. Anyway, to explain better, I want to create an update statement so that when (Table A Column A) = (Table B Column A), it would update (Table A Column B) = (Table B Column B)

I already tried

UPDATE TableA SET ColumnB = TableB.ColumnB when TableA.ColumnA = TableB.ColumnA

It gave me an error.. Any help is appreciated!! Thank you.
 
Code:
UPDATE TableA 
SET    TableA.ColumnB = TableB.ColumnB 
From   TableA
       Inner Join TableB
        On TableA.ColumnA = TableB.ColumnA


-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
thank you! works wonderfully..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top