How to Update from One table to another

  • Thread starter Thread starter Joshua A. Booker
  • Start date Start date
J

Joshua A. Booker

Hi There,

How do I do this in an ADP?

UPDATE tbl_QuoteDates INNER JOIN Quotes ON tbl_QuoteDates.QuoteId =
Quotes.[Quote ID] SET tbl_QuoteDates.CustomerID = [Quotes].[CustomerID];

It appears as though the update statement cannot have joins? If so, then
how is this update done?

TIA,
Josh
 
Hi Josh

----
UPDATE tbl_QuoteDates
SET tbl_QuoteDates.CustomerID = [Quotes].[CustomerID]
FROM tbl_QuoteDates INNER JOIN
Quotes ON tbl_QuoteDates.QuoteId = Quotes.[Quote ID];
----

bye
--
Giorgio Rancati
[Office Access MVP]

Joshua A. Booker said:
Hi There,

How do I do this in an ADP?

UPDATE tbl_QuoteDates INNER JOIN Quotes ON tbl_QuoteDates.QuoteId =
Quotes.[Quote ID] SET tbl_QuoteDates.CustomerID = [Quotes].[CustomerID];

It appears as though the update statement cannot have joins? If so, then
how is this update done?

TIA,
Josh
 
The syntaxe is a little different between Access and SQL-Server. Try
something like:

UPDATE tbl_QuoteDates
SET tbl_QuoteDates.CustomerID = [Quotes].[CustomerID]
FROM tbl_QuoteDates INNER JOIN Quotes ON tbl_QuoteDates.QuoteId =
Quotes.[Quote ID]

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


Joshua A. Booker said:
Hi There,

How do I do this in an ADP?

UPDATE tbl_QuoteDates INNER JOIN Quotes ON tbl_QuoteDates.QuoteId =
Quotes.[Quote ID] SET tbl_QuoteDates.CustomerID = [Quotes].[CustomerID];

It appears as though the update statement cannot have joins? If so, then
how is this update done?

TIA,
Josh
 
Back
Top