Not beautifull format
tco
Posts: 9 New member
in SQL Prompt
DECLARE @x BIT
=0
,@r VARCHAR(MAX) ='
-------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
'
Tagged:
Best Answer
-
tco Posts: 9 New memberThanks.
But this is not a problem to add in forum. The simple way is two DECLAREDECLARE @x BIT=0DECLARE @r VARCHAR(MAX)='-------- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----'
Answers
I'm not sure whether it's partly the formatting of the forum or not that has affected the format you've shown, but what would you like this to look like? I think the data line is always going to be an issue, but depending on the options used, I can get this to look like:
Which is more orderly at the least, but may or may not be what you are looking for. If you could share a screenshot of what you are hoping it would look like then I could help try to get it to that format.
Kind regards,
Alex
Have you visited our Help Center?
I'm attaching a style that accomplishes this, though it may have an effect on the format of other things that you do not want - namely because getting the first item after the declare on the same line is a global option in the Lists > List items section.
I've had to add the .txt extension, but please remove this and place the file into your
%LocalAppData%\Red Gate\SQL Prompt 9\StylesV2
folder, then open the SQL Prompt > Edit Formatting styles window to be able to choose ABTestStyle.
If that doesn't meet your requirement and/or has adverse impact on other parts of your queries, please add a suggestion to the SQL Prompt Uservoice forum for more specific functionality for your example.
Kind regards,
Alex
Have you visited our Help Center?