Question : replace cells in database from another database. keep all other cells in record the same.

PartRevisions table have the following columns:

(<imrPartID, char(30),>
,<imrPartRevisionID, char(15),>
,<imrShortDescription, char(50),>
,<imrLongDescriptionRTF, text,>
,<imrLongDescriptionText, text,>
,<imrLongDescriptionHTML, text,>
,<imrUniversalProductCode, char(13),>
,<imrProductionNotesRTF, text,>
,<imrProductionNotesText, text,>
,<imrDocuments, text,>
,<imrSourceMethodID, char(30),>
,<imrPartImageFileName, char(70),>
,<UIMRWEBTEXTDESCRIPTIONTEXT, text,>
,<UIMRWEBTEXTDESCRIPTIONRTF, text,>
,<UIMRACRYLICCOLOUR, char(30),>
,<UIMRCABINETCOLOUR, char(30),>
,<UIMRHARDCOVERCOLOUR, char(30),>
,<UIMRACRYLICSHEET, char(50),>)

I would like to replace the cells in M1_UA.dbo.PartRevisions.imrShortDescription
with M1_TJ.dbo.PartRevisions.imrShortDescription

See image attached.

Thanks!


 
 
PartRevisionsTables
331937
 

Answer : replace cells in database from another database. keep all other cells in record the same.

What is the key that joins the two tables?
I see imrpartid + impartrevisionid - do these make it unique?

Update A
SET imrShortDescription = B.imrShortDescription
from M1_UA.dbo.PartRevisions A
INNER JOIN M1_TJ.dbo.PartRevisions B on A.imrpartid=B.imrpartid and A.impartrevisionid=B.impartrevisionid
Random Solutions  
 
programming4us programming4us