Re: UPDATE (SQL): multiple SET fields not allowed?
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Jul 2006 08:45:19 -0400
"Allen_N" <AllenN@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:042A714E-0E0A-4C4A-8303-57777AA56AEE@xxxxxxxxxxxxx
(My previous reply didn't contain what I typed! Data lost due to
timeout?)
No, I can't see that working. I'm now trying to do it by stepping
through the records of Table1 in a VB loop. What syntax can I use to
change the value of a field in the current record?
"Allen Browne" wrote:
Any chance of using an INNER JOIN between Table1 and Table2?
Join on the 2 fields, and the query should be updatable.
What's wrong with
UPDATE
Table1 a
INNER JOIN
Table2 b
ON
a.Grp1 = b.Grp2old AND a.Item1 = b.Item2old
SET
a.Grp1 = b.Grp2new,
a.Item1 = b.Item2new;
?
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- References:
- Re: UPDATE (SQL): multiple SET fields not allowed?
- From: Allen Browne
- Re: UPDATE (SQL): multiple SET fields not allowed?
- From: Allen Browne
- Re: UPDATE (SQL): multiple SET fields not allowed?
- From: Allen_N
- Re: UPDATE (SQL): multiple SET fields not allowed?
- Prev by Date: to show a recordset as table
- Next by Date: Re: to show a recordset as table
- Previous by thread: Re: UPDATE (SQL): multiple SET fields not allowed?
- Next by thread: Re: UPDATE (SQL): multiple SET fields not allowed?
- Index(es):
Relevant Pages
|