| Author |
Message |
georhill
Joined: 27 Jan 2011 Posts: 12
|
Posted: Tue Jul 03, 2012 6:43 pm Post subject: Data Compare 10.2.0.315 - generated sync script contains err |
|
|
The sync script that is generated by the deployment wizard contains an error when there is a where clause specified on the table during comparison.
Here is the where clause that I specified when I compared the app_code table: "where type = 'prog_degree'"
Here is part of the generated script from the deployment wizard:
-- Update 17 rows in [dbo].[APP_CODE]
UPDATE [dbo].[APP_CODE] SET [OPTION_1]='Level_2', [OPTION_2]='20', [OPTION_3]='ASSOC', [OPTION_4]='Assoc or Tech Level' WHERE [SUBSYSTEM]='CUS' AND [TYPE]='PROG_DEGREE' AND [CODE]='ASSOC' AND (where type = 'prog_degree')
UPDATE [dbo].[APP_CODE] SET [OPTION_1]='Level_3', [OPTION_2]='32', [OPTION_3]='BA_BS', [OPTION_4]='Bachelor Level' WHERE [SUBSYSTEM]='CUS' AND [TYPE]='PROG_DEGREE' AND [CODE]='BA' AND (where type = 'prog_degree')
...
The last "and" clause causes a syntax error in SSMS. |
|
| Back to top |
|
 |
james.billings
Joined: 16 Jun 2010 Posts: 844 Location: My desk.
|
Posted: Tue Jul 03, 2012 7:33 pm Post subject: |
|
|
When you specify a where clause in SQL Data Compare, don't include the "where" keyword. So in your case it would just be " type = 'prog_degree'"
This is because there's already a where clause added internally by the software so it's working on the right record. |
|
| Back to top |
|
 |
georhill
Joined: 27 Jan 2011 Posts: 12
|
Posted: Tue Jul 03, 2012 8:57 pm Post subject: |
|
|
| Got it! Thanks for the clarification. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group