non-updatable query frustration

  • Thread starter Thread starter ragtopcaddy via AccessMonster.com
  • Start date Start date
R

ragtopcaddy via AccessMonster.com

In the following generic example, why is the query result not updatable?
There are 2 tables in the query. tblA has 5 fields and I'd like to update
field4 with a value returned from a corresponding field in tblB. I've
presented it here as a select query because I can't update the resulting
records in the select query, either. I assume if I can figure out how to
update the select query manually, I'll be able to run the update query.

SELECT tblA.field4, tblA.field5
FROM tblA INNER JOIN tblB ON (tblA.field1 = tblB.field1) AND (tblA.field2 =
tblB.field2) AND (tblA.field3 = tblB.field3);

Thanks,

Bill R

--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via AccessMonster.com
 
ragtopcaddy said:
In the following generic example, why is the query result not updatable?

Field1, field2 and field3 must be the primary key (or have a unique index, no
nulls) in the table on the one side (tblB?) and field1, field2 and field3
must have a unique index, no nulls, in the table on the many side (tblA?).
 
Thanks for you help. I'll check for nulls in the tables.

Granny said:
Field1, field2 and field3 must be the primary key (or have a unique index, no
nulls) in the table on the one side (tblB?) and field1, field2 and field3
must have a unique index, no nulls, in the table on the many side (tblA?).

--
Bill Reed

"If you can't laugh at yourself, laugh at somebody else"

Message posted via AccessMonster.com
 
ragtopcaddy said:
Thanks for you help. I'll check for nulls in the tables.

You're welcome, Bill. I mentioned the nulls because nulls are never equal to
nulls in joins.
 
Back
Top