why does this query not run?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

UPDATE tblusers SET userkeycode = (select userkeycode from tbluserdirectory where lastname = tblusers.lastname and firstname = tblusers.firstname);

i get a message 'must be an updatable query'.
 
somanybugssolittletimetofixthem said:
UPDATE tblusers SET userkeycode = (select userkeycode from tbluserdirectory where
lastname = tblusers.lastname and firstname = tblusers.firstname);
i get a message 'must be an updatable query'.

Hi so,

Does distinct lastname/firstname
make a distinct record in tbluserdirectory?

This looks like the form:

UPDATE tbl1 INNER JOIN tbl2
ON tbl1.PK = tbl2.PK
SET tbl1.f1 = tbl2.f1


UPDATE
tblusers t1
INNER JOIN
tbluserdirectory t2
ON
t1.lastname = t2.lastname
AND
t1.firstname = t2. firstname
SET t1.userkeycode = t2.usekeycode;
 
Back
Top