Hi, when I use SELECT TOP, the first column is immediately after the TOP clause. How can I have it below SELECT? Also, it would be amazing if the first column_name is aligned (one character to the right) with the rest of the columns, which have a comma as the first character. Please see the code and expected behaviour below.
Thank you
DECLARE @TopCount INT = 300
SELECT TOP (@TOPCOUNT) JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
SELECT TOP 300 JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
SELECT
JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
/*------------------------------------
--expected behaviour
DECLARE @TopCount INT = 300
SELECT TOP (@TOPCOUNT)
JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
SELECT TOP 300
JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
SELECT
JournalId = jr.JournalId
,CategoryId = jr.CategoryId
,AccountTransactionId = jr.AccountTransactionId
,ExpenseTransactionId = jr.ExpenseTransactionId
FROM schema.table jr
*//*------------------------------------

