Extra WHERE clause in my update statments
bsimmons4
Posts: 3
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)
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
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
WHERE [Customer_ID]=1 AND [Master_ID]=1809 AND (Customer_ID = 1)
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