Extra WHERE clause in my update statments

bsimmons4bsimmons4 Posts: 3
edited September 30, 2014 1:18AM in SQL Data Compare Previous Versions
In SDC 10, I have a where clause on my table to filter on data for 1 specific customer. When the UPDATE statement is created, I have an extra WHERE clause appended to the end of the statement.

In the WHERE Clause editor I have the "Use the same WHERE clause for both data sources" checked and I typed in: WHERE Customer_ID = 11.

Here is an update statement on 1 of my tables, notice the extra WHERE at the end. This seems like a huge bug.

UPDATE [dbo].[DAO_Customers] SET [CustomPt_BUID]=NULL, [CustomPt_BUID_Test]=NULL, [CustomPt_Site_ID]=NULL, [CustomPt_Site_ID_Test]=NULL, [Allow_Kits]='Y', [Allow_CSS]='Y', [Allow_Page_Exceptions]=1 WHERE [Customer_ID]=11 AND (WHERE Customer_ID = 11)

Comments

  • Hello,

    Thanks for contacting us via the forums. I did some research on this issue and it looks like we have seen this when specifying the keyword "where" in the where clause editor.

    To fix this issue:

    - Open the where clause editor
    - Change "WHERE Customer_ID = 11" to "Customer_ID = 11"

    That should fix the deployment script from entering the "where" twice.

    Hope this helps!

    Best Regards,
    Steve
    _________________
    Steve Tanori
    Product Support
    Red Gate Software Ltd.
    866-997-0378
  • I made that change and now my WHERE clause doesn't cause the update statement to fail but it still looks incorrect to have the Customer_ID listed twice.

    WHERE [Customer_ID]=1 AND [Master_ID]=1809 AND (Customer_ID = 1)
  • Hello,

    Thanks for the update. You are correct in that the update will work and the query does look a bit incorrect with the customer ID listed twice. We have this logged as a bug under SDC-1087 to look at for future versions. It should not prevent the deployment script from executing. Sorry about the inconvenience.

    Best Regards,
    Steve
    _________________
    Steve Tanori
    Product Support
    Red Gate Software Ltd.
    866-997-0378
  • In SDC 10, I have a where clause on my table to filter on data for 1 specific customer. When the UPDATE statement is created, I have an extra WHERE clause appended to the end of the statement.
    We offer self paced Testking C4040-122 exam online training for professionals and novices. Get up to date Cambridge College dumps study materials with 100% success guarantee forIBM exam.
Sign In or Register to comment.