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.
jrummell
0

Comments

4 comments

  • Chris Auckland
    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 Auckland
    0
  • jrummell
    Yes, please add a feature request. Thanks!
    jrummell
    0
  • Chris Auckland
    I've submitted a feature request SP-3536 for you.
    Chris Auckland
    0
  • Dalmathus
    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!
    Dalmathus
    0

Add comment

Please sign in to leave a comment.