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

Popular posts from this blog

c++ - list<myClass<int> * > sort -

SoapUI on windows 10 - high DPI/4K scaling issue -

java - why am i getting a "cannot resolve method" error on getApplication? -