Restore contents of a column to a Table from a backed up table

PHOTO EMBED

Wed May 18 2022 13:23:27 GMT+0000 (UTC)

Saved by @paulbarry

--WATERFORD

--Backup Table you are working on first
SELECT *
INTO [TABLE_BACKUPS].[dbo].[WATERFORD_BOCClientIndex - FAF_180522_V1]
FROM [OLIS_DATA_CLARE].[dbo].[BOCClientIndex - FAF]

--Add missing column
ALTER TABLE [OLIS_DATA_WATERFORD].[dbo].[BOCClientIndex - FAF]
ADD NAME_OF_UNIT NVARCHAR(50) NULL

--Update missing column with values from table with the Columns and data
UPDATE [OLIS_DATA_WATERFORD].[dbo].[BOCClientIndex - FAF]
SET [NAME_OF_UNIT] = t2.[NAME_OF_UNIT]
FROM [TABLE_BACKUPS].[dbo].[WATERFORD_BOCClientIndex - FAF]  t2
INNER JOIN [OLIS_DATA_WATERFORD].[dbo].[BOCClientIndex - FAF] t1 ON t2.[FAFID] = t1.[FAFID];
content_copyCOPY

Restore contents of a column to a Table