Hi,
How can I write this correctly in order to achieve this:
update dbo.table1
set B.table1field1=A.table1field1
from dbo.table1 as A,dbo.table1 as B
where A.table1field2=10 and B.table1field2=10 and
A.table1field3=1 and B.table1field3=2
currently I get the following error:
Server: Msg 1032, Level 15, State 1, Line 4
Cannot use the column prefix 'B'. This must match the object in the UPDATE clause 'dbo.table1'.
How can I write this correctly in order to achieve this:
update dbo.table1
set B.table1field1=A.table1field1
from dbo.table1 as A,dbo.table1 as B
where A.table1field2=10 and B.table1field2=10 and
A.table1field3=1 and B.table1field3=2
currently I get the following error:
Server: Msg 1032, Level 15, State 1, Line 4
Cannot use the column prefix 'B'. This must match the object in the UPDATE clause 'dbo.table1'.