List items always added on new line
bunyamin
Posts: 3 New member
SQL Prompt 8.0.1.1383
When using Insert ... Value(@var1, @var2, @var3, ,) statements, variables always created on new line.
I want all variables inside Values() statement side by side as Values(@Variable1, @Variable2 ...)
My style configuration is
GLOBAL > Lists > Place subsequent items on new line : NEVER
GLOBAL > Whitespaces > Warp lines longer than : Unchecked
Sample code is below. Is there any option?
When using Insert ... Value(@var1, @var2, @var3, ,) statements, variables always created on new line.
I want all variables inside Values() statement side by side as Values(@Variable1, @Variable2 ...)
My style configuration is
GLOBAL > Lists > Place subsequent items on new line : NEVER
GLOBAL > Whitespaces > Warp lines longer than : Unchecked
- When variable names are shorter, it works
- When I use Insert () Select @variable1, @variable2 ... it also works
Sample code is below. Is there any option?
Create Table #Table1 ( Col0 int, COl1 int, col2 int, col3 int, col4 int, col5 int, col6 int, col7 int, col8 int, col9 int, col10 int, col11 int, col12 int, col13 int, col14 int, col15 int, col16 tinyint, col17 int) Declare @variable0 int, @variable1 int, @variable2 int, @variable3 int, @variable4 int, @variable5 int, @variable6 int, @variable7 int, @variable8 int, @variable9 int, @variable10 int, @variable11 int, @variable12 int, @variable13 int, @variable14 int, @variable15 int, @variable16 tinyint, @variable17 int Insert #Table1(Col0, COl1, col2, col3, col4, col5, col6, col7, col8, col9, col10, col11, col12, col13, col14, col15, col16, col17) Values(@variable0, @variable1, @variable2, @variable3, @variable4, @variable5, @variable6, @variable7, @variable8, @variable9, @variable10, @variable11, @variable12, @variable13, @variable14, @variable15, @variable16, @variable17)
Tagged:
Comments
Thanks for your post. We've recently released version 8.0.2 of SQL Prompt which I think fixes this issue. You can download the update from inside SSMS by going to SQL Prompt > Help > Check for Updates or by downloading it here
I hope this helps!
James
Redgate Software
Problem gone after version upgrade.
But,
"Place subsequent items on new line : NEVER" option still not working. Because I understand that, If I activate this option, prompt should never add new items to new line. But it is still adding new line, if char count is exceeded the limit set in "GLOBAL > Whitespaces > Warp lines longer than" option.
For example if I use below options :
GLOBAL > Whitespaces > Warp lines longer than = 160
GLOBAL > Lists > Place subsequent items on new line : NEVER
Then format the same code, it will give exact same results. But I expect that variables should be placed side by side.