sql server - Updating table values with value from another table -
i'm trying update blank column values in table same column name. i've written statement values
select p.[id] ,[patientid] ,p.[clinicid] ,[currentplannumber], pin.clinicid [productcheckout] p inner join patients pin on p.patientid=pin.id
when try update columns error:
only 1 expression can specified in select list when subquery not introduced exists.
update [productcheckout] set clinicid = (select p.[id] ,[patientid] ,p.[clinicid] ,[currentplannumber], pin.clinicid [productcheckout] p inner join patients pin on p.patientid=pin.id)
try this
update pin set pin.clinicid = p.[id] [productcheckout] pin inner join patients p on pin.patientid=p.id
Comments
Post a Comment