If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Simple update Query
Hi,
I'm sure I've done this in the past but can't figure how. I have 2 tables "A" and "B" both with the following fields Town; Council I want to update Table "A"'s Council field with the Council information in table "B" Could someone please give me the SQL code to do this. Thanks in advance |
#2
|
|||
|
|||
Simple update Query
UPDATE TableA INNER JOIN TableB
ON TableA.Town = TableB.Town SET TableA.Council = TableB.Council. IF you can only do this using design view -- Open a new query -- Select the two tables -- Set up a join by dragging from town to town -- add the Council field from Table A to the list of fields -- Select Query: UPdate from the menu -- Type the following in the UPDATE TO "cell" under the Council field [Table b].[Council] -- SELECT Query : Run from the menu '================================================= === John Spencer Access MVP 2002-2005, 2007-2008 Center for Health Program Development and Management University of Maryland Baltimore County '================================================= === wrote: Hi, I'm sure I've done this in the past but can't figure how. I have 2 tables "A" and "B" both with the following fields Town; Council I want to update Table "A"'s Council field with the Council information in table "B" Could someone please give me the SQL code to do this. Thanks in advance |
Thread Tools | |
Display Modes | |
|
|