Comments
Sort by recent activity
OK, I have these answers: ========= This is due to the Control Flow options they have set and the example they use in the different cases. So they have "Place BEGIN keyword on new line" true "Indent BEGIN END keywords" false "Indent contents of statements" true "Collapse statements shorter than <100> characters" true In the first example ```IF @Country = 'USA' BEGIN SET @FormatCode = 1; END; ELSE BEGIN SET @FormatCode = 2; END;``` It's collapsing the statements because they are shorter than 100 characters - this overrides the Begin on new line and the indent contents of statements. It does something odd though if you make "Place BEGIN keyword on new line" false but leave the others - it then indents the second SET statement which I think is probably a bug. In their last example the content of the BEGIN/END is more than 100 chars and so it doesn't collapse it.
This is all independent of how far the IF is indented as that will be set to the correct indention if the collapse is not set. So if you add another BEGIN / END around the above query and turn off collapse, it will indent the content of the overall BEGIN as well as the internal BEGINs to the correct place ========
I've played with the style. I think the removing the collapse item fixes most of this, but the SETs are still wrong if things are not included inside some other structure. Is this just a script you have or is it part of a larger set of work?
/ comments
OK, I have these answers:=========This is due to the Control Flow options they have set and the example they use in the different cases. So they have"Place BEGIN keyword on new line" true"Indent B...
Hmm, with your style, I get this:
IF @Country = 'USA' BEGIN<br>SET @FormatCode = 1;<br>END;<br>ELSE BEGIN<br>SET @FormatCode = 2;<br>END;Not sure why you get the weird formatting. I'll have to bump this.
/ comments
Hmm, with your style, I get this:
IF @Country = 'USA' BEGIN<br>SET @FormatCode = 1;<br>END;<br>ELSE BEGIN<br>SET @FormatCode = 2;<br>END;Not sure why you get the weird formatting. I'll have to bump...
Can you upload your formatting file? Is that what you mean by style sheet? / comments
Can you upload your formatting file? Is that what you mean by style sheet?
This is what I see
[image]
/ comments
This is what I see
I'm unclear of what's happening here. I don't get the before/after view here. Is this post formatting? I don't see this behavior, but I wonder if I'm not reproducing this correctly. / comments
I'm unclear of what's happening here. I don't get the before/after view here. Is this post formatting? I don't see this behavior, but I wonder if I'm not reproducing this correctly.
719 is a busy db, but not that crazy. Some of this is the time it takes for comparisons of objects and refreshing. You can lower the refresh rate if you're working in a dedicated model. If you have a shared database, be careful of doing this, or make sure when you check the commit tab, that you examine changes which might be made by others. There could be conflicts or overwrites you want to be aware of. The other suggestion I have is to use SQL Search more to find objects rather than browsing the OE. I tend to browse myself, but that's a poor habit and it can be slow compared to searching for objects. If you have the toolbelt, I'd also use the dependency tracker to get a pick list of items to work on based on a change. So if I change a table, I can get dependent objects to check and order my work with the dependency tracker information. Prompt also has a lot of data about objects, which can reduce the time spent in OE. I know these are workarounds and cumbersome. There is some ongoing work with SQL Source Control, but with the nature of trying to capture changes and update the user, this just isn't a fast process, especially because SSMS doesn't make this easy. / comments
719 is a busy db, but not that crazy. Some of this is the time it takes for comparisons of objects and refreshing. You can lower the refresh rate if you're working in a dedicated model. If you have...
Also, what's the count(*) from sysobjects for your database(s) / comments
Also, what's the count(*) from sysobjects for your database(s)
Does this happen often? Is Counter in multiple tables in this query? Do you know what might be on the right side? / comments
Does this happen often? Is Counter in multiple tables in this query? Do you know what might be on the right side?
In VS, do you have the SQL Prompt menu and suggestions enabled?
[image]
/ comments
In VS, do you have the SQL Prompt menu and suggestions enabled?
Glad to hear it. Hope you don't find any more new issues. / comments
Glad to hear it. Hope you don't find any more new issues.