suggestion - sql promt edit style for Parenthesis should allow one more style
shawndevin
Posts: 4 New member
in SQL Prompt
would it be possible to add one more style to the edit style page for Parentheses? I would like the inline ( but have the sql code indented. for example:
SET @recent=(
select top 1 name
from production.product product
where p.id>20
order by modifiedDate
);
I use sub queries fairly often and I always indent the text of the sub-query like this and its the one option you don't allow though it seems extremely obvious
I use sub queries fairly often and I always indent the text of the sub-query like this and its the one option you don't allow though it seems extremely obvious
Tagged:
Answers
Thanks for reaching out to us regarding this.
Regarding the first example, I think I've been able to achieve what you are after with the example statement you provided.
Under Parentheses, I selected the 5th style (the last style on the top line) and checked 'Indent parentheses contents'. Also, just to mention, I had to ensure 'Place DISTINCT/TOP clause on new line (under Data (DML) was unchecked to stop 'name' going onto a new line. Having these formatting settings in place made the example statement look as required.
Regarding indenting the content of the schema and the CTE statement formatting, I've not been able to find a way to do either of these so far.
I wondered, would it be possible for you to provide you style file? That way I can use it to further test this.
Dan Jary | Redgate Software
Have you visited our Help Center?