How can we help you today? How can we help you today?
a.higgins
Clarifying note, the error happens when I try to format a script that contains both of the above queries, when both queries contain a HAVING and FOR SYSTEM_TIME. / comments
Clarifying note, the error happens when I try to format a script that contains both of the above queries, when both queries contain a HAVING and FOR SYSTEM_TIME.
0 votes
When text is highlighted, hitting the Ctrl key will bring up the dialog box. Typing, such as commas, will filter down the list of actions to what you want. So, with text highlighted, I hit Ctrl, type 'comma', and then hit Enter. / comments
When text is highlighted, hitting the Ctrl key will bring up the dialog box. Typing, such as commas, will filter down the list of actions to what you want. So, with text highlighted, I hit Ctrl, t...
0 votes
That works quite well, thank you! As you suggested, I've created a separate UserVoice request for this feature at https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/17814271-discover-metadata-for-openquery. / comments
That works quite well, thank you! As you suggested, I've created a separate UserVoice request for this feature at https://redgate.uservoice.com/forums/94413-sql-prompt/suggestions/17814271-discover...
0 votes
For whatever it's worth, this appears to only apply to table variables: both temporary tables and true tables format without adding the alias. / comments
For whatever it's worth, this appears to only apply to table variables: both temporary tables and true tables format without adding the alias.
0 votes
Is there any update on this issue? It is still messing up our build and deployment process, and the DBAs are getting annoyed at the repeated release requests. / comments
Is there any update on this issue? It is still messing up our build and deployment process, and the DBAs are getting annoyed at the repeated release requests.
0 votes
A few more details: This morning I used SQL Compare to do a Production deployment changing a table called DimCourse. The table had to be rebuilt due to a change in column order caused by the addition of a new column. There are four different foreign keys that point to DimCourse as a referenced object. Before the deployment, all four of the foreign key constraints had two extended properties defined: MS_Description and FK_On_Delete_Action. QA and Prod showed no differences between those four tables. SQL Prompt generated a script which dropped the foreign keys from the other objects, dropped / rebuilt DimCourse, and then recreated the foreign keys on the other objects. However, the script did not also recreate the extended properties that had previously been defined on those foreign keys. After the deployment was complete, I reran SQL Compare and it found differences between the two environments, and wants me to use the following script to re-sync them: /* Run this script on: xxxxx - This database will be modified to synchronize it with: xxxxx You are recommended to back up your database before running this script Script created by SQL Compare version 12.0.37.3561 from Red Gate Software Ltd at 11/14/2016 8:59:02 AM */ SET NUMERIC_ROUNDABORT OFF GO SET ANSI_PADDING, ANSI_WARNINGS, CONCAT_NULL_YIELDS_NULL, ARITHABORT, QUOTED_IDENTIFIER, ANSI_NULLS ON GO USE [AARDW] GO SET XACT_ABORT ON GO SET TRANSACTION ISOLATION LEVEL Serializable GO BEGIN TRANSACTION GO IF @@ERROR <> 0 SET NOEXEC ON GO PRINT N'Creating extended properties' GO EXEC sp_addextendedproperty N'FK_On_Delete_Action', N'Remove Row', 'SCHEMA', N'dbo', 'TABLE', N'BrgFacultyCourseQualification', 'CONSTRAINT', N'FK_FacultyCourseQualification_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'MS_Description', N'Foreign Key to DimCourse', 'SCHEMA', N'dbo', 'TABLE', N'BrgFacultyCourseQualification', 'CONSTRAINT', N'FK_FacultyCourseQualification_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'FK_On_Delete_Action', N'Remove Row', 'SCHEMA', N'dbo', 'TABLE', N'DimCourseSection', 'CONSTRAINT', N'FK_CourseSection_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'MS_Description', N'Foreign Key to DimCourse', 'SCHEMA', N'dbo', 'TABLE', N'DimCourseSection', 'CONSTRAINT', N'FK_CourseSection_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'FK_On_Delete_Action', N'Remove Row', 'SCHEMA', N'dbo', 'TABLE', N'FactPersonExternalCourse', 'CONSTRAINT', N'FK_PersonExternalCourse_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'MS_Description', N'Foreign Key to DimCourse', 'SCHEMA', N'dbo', 'TABLE', N'FactPersonExternalCourse', 'CONSTRAINT', N'FK_PersonExternalCourse_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'FK_On_Delete_Action', N'Remove Row', 'SCHEMA', N'dbo', 'TABLE', N'FactStudentCourseSection', 'CONSTRAINT', N'FK_StudentCourseSection_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO EXEC sp_addextendedproperty N'MS_Description', N'Foreign Key to DimCourse', 'SCHEMA', N'dbo', 'TABLE', N'FactStudentCourseSection', 'CONSTRAINT', N'FK_StudentCourseSection_Course' GO IF @@ERROR <> 0 SET NOEXEC ON GO COMMIT TRANSACTION GO IF @@ERROR <> 0 SET NOEXEC ON GO DECLARE @Success AS BIT SET @Success = 1 SET NOEXEC OFF IF (@Success = 1) PRINT 'The database update succeeded' ELSE BEGIN IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION PRINT 'The database update failed' END GO I would expect that these extended properties should be recreated as part of the initial deployment, when the foreign keys referencing the changed object are recreated. / comments
A few more details: This morning I used SQL Compare to do a Production deployment changing a table called DimCourse. The table had to be rebuilt due to a change in column order caused by the addit...
0 votes
Is there any other information I can provide to help you with this? These deployment issues are wreaking havoc with our release process, and I'm very motivated to help you if you need anything! / comments
Is there any other information I can provide to help you with this? These deployment issues are wreaking havoc with our release process, and I'm very motivated to help you if you need anything!
0 votes