I am trying to write a SQL statement that performs an update with two tables. I have tried with the SELECT statement, and it is working, but with update I get an error:
the multi-part identifier could not be bound update
SELECT cIntrodRefCode, iPayerCompanyID, cIntrodEmail, bGSTApply, *
FROM tblIntroducer
INNER JOIN tblEntity
ON tblIntroducer.iIntroducerID = tblEntity.iEntityRootID
WHERE cIntrodRefCode = '4'
Update statement not working it shows:
the multi-part identifier could not be bound update
UPDATE t1
SET t1.bGSTApply = 1, t1.cIntrodEmail = 'michaelc@gorapid.com.au', t2.iPayerCompanyID = 7
FROM tblIntroducer AS t1
INNER JOIN tblEntity AS t2
ON t1.iIntroducerID = t2.iEntityRootID
WHERE t1.cIntrodRefCode = '4'
I have also tried this one but it also shows the same error
UPDATE tblIntroducer
SET tblIntroducer.bGSTApply = 1, tblIntroducer.cIntrodEmail = 'michaelc@gorapid.com.au', tblEntity.iPayerCompanyID = 7
FROM tblIntroducer
INNER JOIN tblEntity
ON tblIntroducer.iIntroducerID = tblEntity.iEntityRootID
WHERE tblIntroducer.cIntrodRefCode = '4'