Column names must be unique?
BasharLulu
Posts: 9
Hi!
When trying to use SQL Packager to synchronize two databases using an EXE I get the following wierd error message;
'Column names in each table must be unique.
Column name 'Category' in 'dbo.tblConfig' is specified more than once.'
I tried to remove this table from the synchronization package but I still get the same error.
What to do? Thanks in advance.
When trying to use SQL Packager to synchronize two databases using an EXE I get the following wierd error message;
'Column names in each table must be unique.
Column name 'Category' in 'dbo.tblConfig' is specified more than once.'
I tried to remove this table from the synchronization package but I still get the same error.
What to do? Thanks in advance.
Comments
You could be attempting to run an 'upgrade' package on a database other than one of the databases on which the package had been generated. This is one way I can think of when a package would attempt to add a column that already exists.
This is indeed the case here. Is there some sort of workaround for this? I know this sounds stupid, but we sometimes have to resort to such tactics.
Furthermore, why can't I remove this table from the synchronization package. I've unchecked the checkbox next to it but nothing happens.
Thanks,
Bashar Lulu
If you cannot get rid of the table, chances are it's automatically included as part of a dependency, In other words, if you do not include the table a change to a view or stored procedure may then fail.
I created another SQL package. This time I'm updating the database with which I created the original comparison. The same error ooccurs.
Other errors occur, but I'd like to resolve this one first.
Thanks,
Bashar Lulu, MVP
Information Systems Analyst
I apologize for the delay in my reply. Please find enclosed the script for the table 'tblConfig' which is causing the first of my many errors;
[code]/****** Object: Table [dbo].[tblConfig] Script Date: 25/04/2006 01:40:39 PM ******/
CREATE TABLE [dbo].[tblConfig] (
[TrxNo] [int] NOT NULL ,
[Value] [nvarchar] (200) COLLATE Arabic_CI_AS NULL ,
[ADescription] [nvarchar] (200) COLLATE Arabic_CI_AS NULL ,
[EDescription] [nvarchar] (200) COLLATE Arabic_CI_AS NULL ,
[Chk] [int] NULL ,
[category] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tblConfig] WITH NOCHECK ADD
CONSTRAINT [PK_tblConfig] PRIMARY KEY CLUSTERED
(
[TrxNo]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tblConfig] ADD
CONSTRAINT [DF_tblConfig_category] DEFAULT (0) FOR [category]
GO
CREATE INDEX [IDX_tblConfig_category] ON [dbo].[tblConfig]([category]) ON [PRIMARY]
GO
CREATE INDEX [IX_tblConfig_category] ON [dbo].[tblConfig]([category]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tblConfig] ADD
CONSTRAINT [FK_tblConfig_ConfigCategory] FOREIGN KEY
(
[category]
) REFERENCES [dbo].[ConfigCategory] (
[code]
) ON UPDATE CASCADE
GO[/code]
Thanks.
Bashar Lulu
In the database that you're going to upgrade, is the collation order the same (Arabic_CI_AS)?
Yes it is.
Bashar Lulu