Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / March 2007

Tip: Looking for answers? Try searching our database.

updating table based on another table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
alekm - 21 Mar 2007 11:23 GMT
Hi,
what's the exact syntax in Access for the following meta sql:
UPDATE TABLEA
SET     b = TABLEB.b1,
c = TABLEB.c1,
d = TABLEB.d1
FROM TABLEA, TABLEB
WHERE TABLEA.a = TABLEB.a1

ie. I want to update tableA with values from tableB
Thanx

alek_mil
Dale Fye - 21 Mar 2007 12:57 GMT
Alek,

UPDATE TableA as A
INNER JOIN TableB as B
ON A.ID = B.ID
SET A.[FieldName1] = B.[FieldName1], A.[FieldName2] = B.{FieldName2]

HTH
Dale
Signature

Email address is not valid.
Please reply to newsgroup only.

> Hi,
> what's the exact syntax in Access for the following meta sql:
[quoted text clipped - 9 lines]
>
> alek_mil
John Spencer - 21 Mar 2007 13:05 GMT
The syntax in Access (Jet) is as follows

UPDATE TABLEA INNER JOIN TableB
On TableA.a = TableB.a1
SET  TableA.b = TableB.b1,
TableA.c = TableB.c1,
TableA.d = TableB.d1

If you have additional criteria you can add a where clause at the end.
WHERE TABLEA.a = "My Name"

Signature

John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

> Hi,
> what's the exact syntax in Access for the following meta sql:
[quoted text clipped - 9 lines]
>
> alek_mil
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.