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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query help needed! 1

Status
Not open for further replies.

SarasotaIT

IS-IT--Management
Mar 25, 2003
23
US
I am trying to increase a field's value in tbl1 by 2 if the same account number exists in tbl2. I think I may be partially there but Access returns an error. Here's what I have...

UPDATE tbl1 SET fld = fld+2
WHERE (SELECT T1.account, T2.account
FROM tbl2 T2, tbl1 T1
WHERE T1.account=T2.account);

Thanks much in advance!
Terry
 
try this --

[tt]UPDATE tbl1
INNER
JOIN tbl2
on tbl1.account = tbl2.account
SET fld = fld+2[/tt]

rudy
 
Thanks much, Rudy! You helped me out of the abyss! Kudos!
Terry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top