Sort selected section of code alphabetically

BjørnBjørn Posts: 1 New member
edited May 21, 2021 8:42AM in SQL Prompt
Hi.
I was just wandering if there is an option somewhere to sort whatever part of my code that I have currently selected? E.g if I choose all the columns in a SELECT statement:

SELECT
  Product <-- Select these 4 lines of code
  Date      <--
  Price     <--
  Customer <--
From
  Table

And then choose a command for "Sort alphabetically", I get the code reformatted to:

SELECT
  Customer
  Date
  Price
  Product
From
  Table


If I have "hundreds" of columns in my SELECT statement, sorting the columns alphabetically can save a lot of time when going throug the resultset, looking for specific columns.

Tagged:

Answers

  • Hi Bjørn,

    Thank you for raising your query with Redgate Support Forum.  I've created a new support ticket to ensure we capture all the details. 

    Regards,

    David Harris | Product Support Engineer

    Product Support Engineer | Redgate Software

    Have you visited our 
    Help Center?
Sign In or Register to comment.