I have two tables that have the same data and fields except for one. I want to UPDATE the table that is missing the field 'SBCMP'. Here is the definition of the table I want to add the field and data to:
[dbo].[SalesData](
[SBLOC] [varchar](3) NULL,
[SBCUST] [varchar](7) NULL,
[RMNAME] [varchar](30) NULL,
[IFPRVN] [varchar](6) NULL,
[SBITEM] [varchar](25) NULL,
[SBITD1] [varchar](50) NULL,
[SBDIV] [smallint] NULL,
[SBCLS] [smallint] NULL,
[SBQSHP] [smallint] NULL,
[AVC] [real] NULL,
[SBEPRC] [real] NULL,
[SBINV] [int] NULL,
[SBORD] [int] NULL,
[SBTYPE] [varchar](1) NULL,
[SBINDT] [datetime] NULL,
[RMSTAT] [varchar](2) NULL
The other table has the exact same table definitions except it has the field [SBCMP] [smallint] NULL
I would just use the new table, but the old table has other older data that the new one does not.
I just want to know what is the best method of UPDATE for the table to add the field and data.