Error in diffing to script a field calculated with modulo
NHMFLDev
Posts: 2
This came about when I started investigating using SQL Compare to export our DDL/DML to disk for use with source control. One of our tables would always show up as having a difference, even if it was just exported. Looking closer, the difference was with one table that had a calculated column using the modulo operator.
Simplified test table:
When I use SQL Compare 7.1.0.197 with a destination data source type of "Scripts folder" with everything else at the defaults, it will always show up in the GUI as having one difference. Looking at the output file %DBNAME%\Tables\dbo.RedGateTest.sql, we get:
In the GUI, the scripts folder pane shows the following code:
Any ideas?
[Edit]
SQL Server 2000 running on Windows Server 2003.
Simplified test table:
CREATE TABLE [RedGateTest] ( [BigNumber] [int] NOT NULL , [SmallerNumber] AS ([BigNumber] % 100) ) ON [PRIMARY] GO
When I use SQL Compare 7.1.0.197 with a destination data source type of "Scripts folder" with everything else at the defaults, it will always show up in the GUI as having one difference. Looking at the output file %DBNAME%\Tables\dbo.RedGateTest.sql, we get:
CREATE TABLE [dbo].[RedGateTest] ( [BigNumber] [int] NOT NULL, [SmallerNumber] AS ([BigNumber] % 100) ) GO
In the GUI, the scripts folder pane shows the following code:
CREATE TABLE [dbo].[RedGateTest] ( [BigNumber] [int] NOT NULL, [SmallerNumber] AS () ) GO
Any ideas?
[Edit]
SQL Server 2000 running on Windows Server 2003.
Comments
Using your simplified test example, I have been able to replicate the reported fault symptoms.
I have submitted a bug report to the development team, to alert them of this issue. The reference for this bug report is SC-4133.
I will post a reply, when I receive feedback from the development team
Thank you for bring this problem to our attention.
Best Regards
Eddie
Senior Product Support Engineer
Redgate Software Ltd
Email: support@red-gate.com