leanneconnexions
MIS
on a test dataset i have created a tbl (testaddress) containing two fields Client_Ref and AddLocality from another table (CR_Clients). I have updated the addlocality values in CR_CLIENTS to Null and now i am trying to put the addlocality back into CR_CLIENTS using the stored data in TestAddress. I am using the following SQL and getting an error. what am i doing wrong?
UPDATE CR_CLIENTS
SET CR_CLIENTS.addlocality = TESTADDRESS.addlocality
WHERE CR_CLIENTS.Client_Ref = TESTADDRESS.Client_Ref
Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'TestAddress' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'TestAddress' does not match with a table name or alias name used in the query.
UPDATE CR_CLIENTS
SET CR_CLIENTS.addlocality = TESTADDRESS.addlocality
WHERE CR_CLIENTS.Client_Ref = TESTADDRESS.Client_Ref
Server: Msg 107, Level 16, State 3, Line 1
The column prefix 'TestAddress' does not match with a table name or alias name used in the query.
Server: Msg 107, Level 16, State 1, Line 1
The column prefix 'TestAddress' does not match with a table name or alias name used in the query.