SQL Formatting for Columns to appear on separate lines
What is the formatting option so that the columns appear on separate lines and also the columns have the alias in them
Best Answer
-
Jon_Kirkwood Posts: 423 Silver 5
Hi @vjacob1
Thank you for reaching out on the Redgate forums regarding your SQL Prompt question.
I believe there are a couple of settings you may want to set to get this working.
When you are editing your style (SQL Prompt > Active Styles > Edit Active Style)
In the Global > Lists menu there are two options for List items
- Place first item on new line
- Place subsequent items on new lines
Enabling these settings should put your columns on separate lines when expanding the wild card
Then in the SQL Prompts options (SQL Prompt > Options > Inserted Code > Aliases
Enable Assign Aliases
This will enable aliases when you enter tables/objects and also when you format code.
This should then turn the statement below into a formatted and expanded block of code
Is this the type of functionality you are trying to achieve?
Jon Kirkwood | Technical Support Engineer | Redgate Software
Answers
Yes that is exactly what I was trying to do.
I just noticed that sometimes it was putting all columns on the same line - I am not sure if it was my settings but I reset everything and went back in and now it is doing the right behavior.
I thought there was some other formatting tweaks that I would need to add.
Thanks!!!!