Align column aliases?

jrummelljrummell Posts: 6
edited October 15, 2010 11:57AM in SQL Prompt Previous Versions
I was wondering if SQL Prompt Pro can right align column aliases? Here's an example:

Before:
SELECT
    column1 AS Column1,
    column2 AS Column2,
    aReallyLongColumnName AS Column3
FROM
    someTable

After:
SELECT
    column1                         AS Column1,
    column2                         AS Column2,
    aReallyLongColumnName AS Column3
FROM
    someTable

The code font isn't monospaced so it may not display correctly. But the the idea is that "AS Columnx" would appear in the same column for each line.

Comments

  • Thanks for your post.

    I'm afraid this isn't possible. There isn't a way to add any custom layout configurations, so if the option isn't there, then SQL Prompt 4 can't do it.

    If you would like this layout option to be considered for a future version, I can add a feature request.
    Chris
  • Yes, please add a feature request. Thanks!
  • I've submitted a feature request SP-3536 for you.
    Chris
  • DalmathusDalmathus Posts: 1 New member
    Was this ever added, currently on SQL prompt 9.

    I want to right align my table aliases. Currently I can only left align them in the style editor.

    See example below of what I want;
    SELECT *
      FROM dbo.user_account         ua
      JOIN dbo.user_account_status uas ON uas.user_account_status_id = ua.user_account_status_id
     WHERE ua.user_account_id = CASE
                                   WHEN 1 = 1 THEN 1
                                   ELSE 2
                                END
    

    Below is what I have available to me at the moment;
    SELECT *
      FROM dbo.user_account        ua
      JOIN dbo.user_account_status uas ON uas.user_account_status_id = ua.user_account_status_id
     WHERE ua.user_account_id = CASE
                                   WHEN 1 = 1 THEN 1
                                   ELSE 2
                                END
    

    Its the last thing in my style guide that is not correct I was so close!
Sign In or Register to comment.