This is the version of different tables.
Update table_1 set
Price = B. Price
From table_1
Inner join table_2 B
On table_1. [type] In (1)
Where B. [type] = 1 and B. Price = 44
The same table is
Declare @ caseid int
Declare @ caseparentid int
Set @ caseid = 160
Set @ caseparentid = 122
Update cos_passengerinfo set
[Name] = B. Name
, [Sexcode] = B. sexcode
, [Identityno] = B. identityno
, [Age] = B. Age
, [Room] = B. Room
, [FLOOR] = B. [Floor]
, [Block] = B. Block
, [Building] = B. Building
, [Estate] = B. Estate
, [Street] = B. Street
, [District] = B. District
, [District2code] = B. district2code
, [Country] = B. Country
, [Telno] = B. telno
, [Emailaddress] = B. emailaddress
, [Referredby] = B. referredby
, [Lastupduser] = B. lastupduser
, [Lastupdtime] = B. lastupdtime
From cos_passengerinfo
Inner join cos_passengerinfo B
-- Destination
On cos_passengerinfo.caseid in
(
Select caseid from cos_case
Where caseparentid = @ caseparentid
And caseid <> @ caseid
And opiniontype = 2
)
--- Source
Where B. caseid = @ caseid