184 results found
-
Add space between closing parethesis of a function call and FROM
Add an option to add a space between a function call, such as COUNT(), and FROM so that we don't end up with code like SELECT COUNT()FROM table. That doesn't happen when I select "Add spaces around parentheses" in the global parentheses options. The only way I've been able to get SQL Prompt to preserve that space is to select "Add spaces around parentheses" in the Function calls options, but I don't want a space between the function name and opening parenthesis.
4 votes -
conditions new line after
Currently we have a standard of placing new line before and after conditions with indent accordingly such that:
a=1
AND
b=2Current version only does:
a=1
AND b=2This is pretty much the only thing lacking from being able to just auto format all our procedures with a single click.
4 votes -
Additional Formatting Options
These are the typical formatting styles I use that I would like to see definable in SQL Prompt. Currently, I use a style that gets me close then manually format the remainder to the code:
Regarding the desired format of
1) SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY all lined up
2) TAB after SELECT, followed by first 'column'
3) Subsequent columns on separate lines and lined up with the first one.
4) TAB after any CASE followed by first WHEN
5) Subsequent WHENs lined up with first one
6) TAB before THEN (i.e. indented one tab from…4 votes -
Add option to wrap lines when concatenating strings
Sometimes I set a variable equal to many strings concatenated together using the "+" syntax. When I format with Regdate, there is no option to wrap lines in this case. Everything ends up on the same line as the SET, so the lines often get very wide and go off screen.
It would be great if there was an option to wrap text if things got too wide horizontally.
One solution would be a setting to format concatenated strings like this:
SET @Variable = N'String1'
+ N'String2'
+ N'String3'4 votesHi Amanda,
Would the ‘wrap lines longer than X characters’ option in the formatting styles help with this?
Tim
-
Lists formatting for Columns and Parameters should be treated separately
The starting item in a List of Columns for a SELECT statement is fine to place on the same line as the SELECT, however, for EXEC <proc name that is probably longer> it looks odd to have the Parameters line up at the end. This should be a separate choice for EXEC Parameters. I chose the "commas before" style for most everything, but prefer the "default" layout for EXEC proc parameters.
4 votes -
Refactoring INSERT into MERGE
Refactoring INSERT into UPDATE is definitely useful, but most of us are familiar with these. The complex MERGE statement is a mess, and a clean way to generate that would be fantastic!! Especially since you can figure out the primary keys, etc..
4 votes -
Move the Options - Styles configuration to the individual Style definition page
Options - Styles pane contains, for example, "Apply column alias style" and its drop-down. This does not belong as a universal style setting, among others.
Please move it to the "Formatting Styles" configuration dialog.
This is because many practitioners either do not know about the "alias = column" capability in T-SQL, or don't like it, or it's contrary to company standards. The ability to use this form, which IMO is more brain-friendly, ought to be on the Formatting page as it is, in fact, a significant style element.
Thanks.
4 votes -
Prefixes in function parameters
SQL Prompt is removing prefixes from column names used as parameters in function-calls. For example, if you use Cross Apply to a system function:
SELECT *
FROM sys.tables AS T
CROSS APPLY sys.fnlistextendedproperty('blah','schema',schemaname(T.schemaid), 'table', T.name, null, null)
It removes "T." from schemaid and name in the parameters list. This means I have to add them back in if the column names are ambiguous. I don't see a setting for this, and have Prompt set to add prefixes to columns in the other clauses. So it'll add "T." to a column in the Select clause, and remove…4 votes -
Apply casing formatting as I type, but without the suggestions.
Currently, SQL Prompt either allows you to apply casing all at once with the Apply Casing Options, or it does it as you type if Enable Suggestions is turned on.
Please add a feature so that I can have casing applied as I type, but without the suggestions.
4 votes -
AND keyword for WHERE and JOINs on new line
There is no option in CLAUSES > JOIN to place AND on new line (Right aligned to INNER) and in Data (DML) there isn't an option to put AND on new line. Lots of tables I join on I am joining on 2 columns and I prefer to have the AND a.col1 = b.col1 on a new line as well.
4 votes -
Formatting Styles should include Global Style parameters
Global formatting options like "Insert Semicolons", "Add brackets to all identifiers" etc should be part of a formatting style, this way changing a formatting style can also quickly switch between these options.
Currently even after changing a formatting style these options on the screenshot below had to be manually changed one by one, it's inefficient to say the least.3 votes -
Add a table alias as a prefix to selected column names
I would love an option where, after adding an alias to a table, you can add it as a prefix to all columns coming from that particular table at once.
Some keystroke like Ctrl + F2 would be nice.
3 votes -
Prompt Styles As Buttons
I've created a few different style templates and named them accordingly, but when I want to add them as buttons to quickly change between styles, there is just a list of styles with no label so I don't know what any of them are.
So I have to trawl through and add each of them as a menu button until the one I want appears, which is incredibly frustrating and time consuming! When its on the menu bar as a button, it has the appropriate name rather than just "style" so can this be added to the add button menu…
3 votes -
Operators configuration depending on where they are placed
There is a general configuration for operators AND/OR. However, for us it is important to distinguish between the different places they are used:
- JOIN
- WHERE
- CASE ...
Would it be possible to configure the AND/OR options inside each block?
3 votes -
Indent FROM clause
Allow the FROM, WHERE, GROUP BY, etc. clauses to indent from the select.
Change
SELECT Col1,
Col2
FROM Tab1
WHERE a = bTo
SELECT Col1, Col2 FROM Tab1 WHERE a = b
3 votes -
Have formatting features for cross join match those of left/right/inner join
I have set up rules to format as such:
Select *
From Employees e Join
People p On e.PersonID = p.PersonID;Each table/view object aligned on a new line. However, when I convert to a "cross join", they don't generate a new line, they concatenate on the same line, like such:
Select *
From Employees e Cross Join People p;3 votes -
Additional options for formatting the ON constraints of a JOIN
It would be appreciated if you could enhance the SqlPrompt Formatting Styles functionality for the Clauses >>> JOIN section. I'd like the ON keyword to stay on the same line as the table-name, but when constraints are line-wrapped, I'd just like them to be "normally" indented.
Presently, the only way to get close to this behavior is to check the "Place ON keyword on new line" checkbox and set "ON keyword alignment" to "Indented". But I don't want that box checked.
3 votes -
Table Column Format Correction
In cases where there is SELECT DISTINCT or SELECT TOP(n) .. I would l like the option to format my table's columns to appear on the next line and indented 1 tab or set of spaces in from the SELECT and not necessarily aligned with DISTINCT or TOP in the line above.
SELECT DISTINCT
COLUMN1,
COLUMN2
FROM ...instead of
SELECT DISTINCT
Column1,
Column2
FROM ...3 votes -
Ability to choose schema when there are multiple objects with the same name exists
Currently when SQL code is formatted, it will pick the first schema, if there are multiple objects with same name but having different schemas. It would be good if the choice is given to the user to choose which schema.objectname to use in this case.
Also it's better if we can exclude certain schema's to be considered during code format. (But want to see the intellisense. Only to exclude them during the code format)
3 votes -
Find invalid objects in script
Highlighting invalid objects is a nice feature, but it would also be nice to "find" invalid objects in a script.
Running SQL Format on a script with an invalid object in it runs fine and gives no error, it just doesn't prefix the object (like a table) with the schema.
It would be nice to have a quick and easy way to "go to next invalid object" or even for when you run SQL Format to have it bring up a warning saying "this/these object/s appear to be invalid".3 votes
- Don't see your idea?