Error in diffing to script a field calculated with modulo

NHMFLDevNHMFLDev Posts: 2
edited November 21, 2008 6:07AM in SQL Compare Previous Versions
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:
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

  • Eddie DEddie D Posts: 1,803 Rose Gold 5
    Thank you for your post into the forum and sorry that you have encountered this problem.

    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
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
Sign In or Register to comment.