Options

Unnecessary warnings (calculated columns)

stephen soltstephen solt Posts: 2
edited May 31, 2005 1:30PM in SQL Compare Previous Versions
I am evaluating SQL Compare for the second time in a year. I am disappointed that it still has problems with fairly straightforward situations.

When I go to synchronize, I get the following warnings:

Column [cAddressline] on table [dbo].[tblCompanies] must be added but has no default and does not allow NULL values. The table must be rebuilt. If the table contains data then the migration script will not work. To avoid this, add a default to the column or mark it as allowing NULL values

Cannot alter column [cSector] AS (isnull([fldSuperSector],N'') + N' / ' + isnull([fldSector],N'')) to [cSector] AS (rtrim((isnull([fldSuperSector],N'') + N' \ ' + isnull([fldSector],N'')))) on table [dbo].[tblProjectSectors]. The table must be rebuilt

Cannot alter column [cLocation] AS (isnull(([fldCompany] + N'\'),N'') + isnull([fldDivision],N'')) to [cLocation] AS (rtrim((isnull([fldCompany],N'') + N' \ ' + isnull([fldDivision],N'')))) on table [dbo].[tblProjectSectors]. The table must be rebuilt


You will see that all of these are computed columns. As you know you cannot define a default and/or null for these but SQL Compare recommends this in the first case. Surely SQL Compare shouldn't have a problem with altering/creating any of the examples, whether or not there is existing data?

Stephen Solt

Comments

  • Options
    Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hello Stephen,

    This is a long-standing issue with SQL Compare that you need to clean up any NULL data before changing a column from allowing NULL data to not allowing NULL data. SQL Server would also give the same complaint if you tried to change a column from NULL to NOT NULL in Enterprise Manager.

    It would be possible for the program to search all null rows and fill them in with something -- but fill them in with what is the dilemma!
This discussion has been closed.