[Solved] SQL: No newlines between list elements

3 Posts
2 Users
0 Likes
219 Views
(@chris_m)
Member
Joined: 2 years ago
Posts: 5
Topic starter  

I would find it useful to be able to not separate some lists in SQL, especially in the group-by or order-by statement.

Example:

select 
  attr1
, attr2
from table1
group by 1,2
order by 1,2;

I would like to have the attributes in the select part on a new line as it is configurable in the tool, but then it will also separate the 1,2 in the group-by and order-by statement.

I wish to be able to define that those lists are not split (maybe over the character-length of list-element).

This topic was modified 2 years ago by chris_m

   
Quote
Guido
(@admin)
Member Admin
Joined: 2 years ago
Posts: 179
 

Hi chris_m

many thanks for your suggestion.

Did you already try the Options "Stack Order By" and "Stack Group By"? See attached screenshot.

Regards

Guido

 

grafik
grafik
This post was modified 2 years ago 2 times by Guido

   
ReplyQuote
(@chris_m)
Member
Joined: 2 years ago
Posts: 5
Topic starter  

Yes, but I understood it the opposite way. I thought that the list will be on one line when the stack flag is set. It's working with your input, thank you!


   
ReplyQuote
Share: