How to update the entire column in the SQL Server table

advertisements

I want to update a column values in sql server table after copying those value from some other table. i.e.

where I have tested this query but not succeeded

update subset_aminer.dbo.sub_aminer_paper
set sub_aminer_paper.p_abstract =
    (select aminer_paper.p_abstract
     from aminer.dbo.aminer_paper
     where pid IN (86257, 116497, 119248, 135555, 147554,
                   149720, 173254, 191333, 196650, 196656,
                   .....long list of other values ......
                   1727408, 1737809, 2034956)
    )

I have to copy data from other database table to my destination database table. So that's y using subset_aminer.dbo.subset_aminer_paper.p_abstract and aminer.dbo.aminer_paper.p_abstract

Please help with acknowledgements. Thanks


update subset_aminer.dbo.sub_aminer_paper SI
set SI.p_abstract = AP.p_abstract
     from aminer.dbo.aminer_paper AP
     where AP.pid IN (86257, 116497, 119248, 135555, 147554,
                   149720, 173254, 191333, 196650, 196656,
                   .....long list of other values ......
                   1727408, 1737809, 2034956) AND AP.ID = SI.ID