Activity overview
Latest activity by james.strath
Looking at views at the moment and it appears that when you right-click and script out an existing view (CREATE, ALTER, DROP AND CREATE, CREATE OR ALTER) where the object has been created with the object type (VIEW) on a new line then the scripting inserts extra white space that's not needed and therefore adjusts the exact script of what it was before: [image] The whitespace inserted is inconsistent between the script methods: [image] [image] Any reason why they can't all just have no or one whitespace in each - or is this an SSMS issue rather than redgate scripting? / comments
Looking at views at the moment and it appears that when you right-click and script out an existing view (CREATE, ALTER, DROP AND CREATE, CREATE OR ALTER) where the object has been created with the ...
I should have mentioned i'd already tried that option but turning that option off means you get countless differences that i do want to ignore and renders that option pointless. regards, James / comments
I should have mentioned i'd already tried that option but turning that option off means you get countless differences that i do want to ignore and renders that option pointless.regards,James
Though i just had it happen on a normal ALTER so I have noticed this One whitespace after my ALTER keyword (renders as CREATE in redgate comparison) things are ok in the generated script [image] No whitespace after the opening keyword things are ok in the generated script [image] But two whitespaces after the opening keyword then the generated script outputs on one line [image] Three whitespaces after the opening keyword then the generated script outputs on one line [image] Tab after the opening keyword and things are ok [image] Even though i've now determined the workaround it will be a bit tedious to police myself and others in code-review to prevent it corrupting the environments. the reason I make this change is that i have litany of code that has ended up similar to this; [image] where there are varying big gaps between the keywords - i don't know exactly where these have come from (SSMS modifications or redgate compare deployments) but in order to stop them from creeping in - i try and enforce a consistent syntax - which the redgate whitespace bug is therefore undermining. Hope above helps resolve. James / comments
Though i just had it happen on a normal ALTER so I have noticed thisOne whitespace after my ALTER keyword (renders as CREATE in redgate comparison) things are ok in the generated scriptNo whitespac...
Hi Christian, In your own test, did you take my proc script as is? Because i think the issue is when the script has CREATE OR ALTER PROC in it, whereas if the script is a CREATE PROC or an ALTER PROC it works Regards, James / comments
Hi Christian, In your own test, did you take my proc script as is? Because i think the issue is when the script has CREATE OR ALTER PROC in it, whereas if the script is a CREATE PROC or an ALTER PR...
the software is saying there aren't any updates to apply as i'm on latest version. [image] RedGate.SQLCompare.UI.exe C:\Program Files (x86)\Red Gate\SQL Compare 15 15.4.13.28096+ebd604dab73334a415f1205f61fa1334ccdf8910 4.0.30319.0 False my current depoloyment showing below where in the screen behind it shows the comparison with PROC keyword on second line but the script window then shows the PROC on first line [image] if i scroll down the script all other procedures have PROC keyword as first word of second line - but this first entry shows it differently for some reason / comments
the software is saying there aren't any updates to apply as i'm on latest version.RedGate.SQLCompare.UI.exeC:\Program Files (x86)\Red Gate\SQL Compare 1515.4.13.28096+ebd604dab73334a415f1205f61fa13...
RedGate.SQLCompare.UI.exe C:\Program Files (x86)\Red Gate\SQL Compare 15 15.4.10.27977+6a233340b701adde9321bff7be3c47314fc3b733 4.0.30319.0 False Thanks Christian- apologies, I should know by now that it would be useful to include these each time on a ticket! - Also that would prompt me to do what i normally do when i encounter a possible issue and update the software to see if it's been resolved already. I will probably update later today i have a simple proc on both databases [image] i make a trivial change to force a difference [image] I go to deploy and the script include my intended change but as a consequence changes the first line [image] so following the deployment it shows as no difference between the two databases [image] but an unintended change has occurred - which means i have to correct it manually afterwards (which is tedious when it surprises you and amends multiple items) and it shows up as every object different when using a different compare tool (Eg devops) [image] script for the simple proc to be precisely like mine - but it happens on any proc, object you write CREATE OR ALTER PROC [dbo].[proc] AS ;BEGIN ;SET NOCOUNT ON ;BEGIN TRY ;DECLARE @this_proc_name sysname = (CONCAT((QUOTENAME(OBJECT_SCHEMA_NAME(@@PROCID))), (CHAR(46)), (QUOTENAME(OBJECT_NAME(@@PROCID))))) ;DECLARE @RC INT = (0) ;RAISERROR(@this_proc_name, 10, 0)WITH NOWAIT ;END_OF_QUERY: ;RETURN(@RC) END TRY BEGIN CATCH ;DECLARE @ErrorMessage NVARCHAR(MAX) = (ERROR_MESSAGE()) ;RAISERROR(@ErrorMessage, 16, -1) ;RETURN(ERROR_NUMBER()) END CATCH END --of sp GO / comments
RedGate.SQLCompare.UI.exeC:\Program Files (x86)\Red Gate\SQL Compare 1515.4.10.27977+6a233340b701adde9321bff7be3c47314fc3b7334.0.30319.0FalseThanks Christian- apologies, I should know by now that ...
Deploy making undesired change to code where there wasn't a difference
when i create or alter an object and have the object name on the following line to the create or alter part on both sides of the comparison identically once i deploy the change (which is further wi...