How can we help you today? How can we help you today?

Is it possible to merge two tables to one?

Hello.

I have two databases, both contain a table called ERPPart_Custom (there are more such duplicates.)
The table on DB 1 has the following columns:

[ERPPartID] [int] NOT NULL,
[PartNumber] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[Description] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[IsRetired] [tinyint] NULL,
[PartTypeCode] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[SpecificWeight] [float] NULL,
[BatchManaged] [int] NULL,
[InterchangabilityGroup] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[Group] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL

The table on DB 2 has the following columns:

[ERPPartID] [int] NOT NULL,
[PartNumber] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[Description] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[IsRetired] [int] NULL,
[StandardLength] [float] NULL,
[IsBW] [int] NULL

When I do a compare and deploy, the result table looks like the first - meaning the columns of the table from DB 2 are gone.

Is it possible to make SQL compare create a script which merges these tables so that the result would be a table with the following columns:

[ERPPartID] [int] NOT NULL,
[PartNumber] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[Description] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[IsRetired] [tinyint] NULL,
[PartTypeCode] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[SpecificWeight] [float] NULL,
[BatchManaged] [int] NULL,
[InterchangabilityGroup] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL,
[Group] [nvarchar] (254) COLLATE Latin1_General_CI_AS NULL
[StandardLength] [float] NULL,
[IsBW] [int] NULL


?

Thank you!
gilorlev
0

Comments

1 comment

  • Rob C
    Hi,

    Sorry, SQL Compare can't merge table definitions. You'll need to do this manually I'm afraid.
    Rob C
    0

Add comment

Please sign in to leave a comment.