MemoryLeak
MemoryLeak

Reputation: 7318

SQL update inner join not working in SQL Server?

UPDATE  d
set d.tSynchronized = 1
from TImageRaw d
inner join TPatientRaw f
on f.tPatCulIntPatIDPk = d.tImgCulIntPatIDFk

The code above is not work in SQL Server, can someone point me the right direction ?

Upvotes: 0

Views: 360

Answers (1)

Adriano Carneiro
Adriano Carneiro

Reputation: 58615

Your UPDATE structure looks fine at first glance. Since you have not stated the error, here are some probable causes:

  • You misspelled some table name
  • You misspelled some column name
  • f.tPatCulIntPatIDPk and d.tImgCulIntPatIDFk do not have compatible types
  • d.tSynchronized is not a numeric typed field

Upvotes: 2

Related Questions