Help with update query

M

Matt Williamson

I have 2 tables that I want to join together into one. In tableA there is a
lot of missing data in a field that tableB has. The common field between the
tables is unique in tableB but in tableA is indexed with duplicates (very
few, but enough to warrant indexing that way)

The query that I came up with to do this is:

UPDATE tableA
INNER JOIN tableB ON (tableB.tax_id = tableA.PSSN)
SET tableA.AccountNo = [tableB]!
Code:
;

When I run the query it tells me it's going to update more rows than exist
in tableA in the first place.

What am I missing here and how can I change this to a select query to see
what data will be returned?

TIA

Matt
 
K

KARL DEWEY

Backup your tables - NOT TESTED !!

UPDATE tableA
INNER JOIN tableB ON (tableA.PSSN=tableB.tax_id)
SET tableA.AccountNo = [tableB]!
Code:
;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top