SQL Prompt

Welcome to the SQL Prompt feature suggestion list. Find out more information about SQL Prompt at http://www.red-gate.com/products/sql-development/sql-prompt/.

If you have any questions, need help or have found a bug in SQL Prompt, please visit the forums at http://www.red-gate.com/messageboard/viewforum.php?f=169.

How can we improve SQL Prompt?

(thinking…)

Enter your idea and we'll search to see if someone has already suggested it.

If a similar idea already exists, you can support and comment on it.

If it doesn't exist, you can post your idea so others can support it.

Enter your idea and we'll search to see if someone has already suggested it.

  • Hot ideas
  • Top ideas
  • New ideas
  • My feedback
  1. Option to include the schema when generating an alias.

    I have tables that repeat in different schemas, for example Supplier.Location and Customer.Location. I'd really like auto-alias to include the schema when generating the alias. Supplier.Location should be SL and Customer.Location should be CL. Instead I end up with L and L2, which is not as clear.

    Ideally, I'd prefer the schema characters to be lowercase and the table to be uppercase. Using sL and cL would make my query even more readable.

    11 votes
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)

      We’ll send you updates on this idea

      4 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
    • Option to customize order of colums or table names listed in suggested box.

      I got 10-20 tables that starts with word citations i mostly use citations and citation_details which is way down on my list. If i could have those to at the top would be save 5 10 extra keys. Same goes with column names. Would be awesome be able sort these by most used or custom sort. And change the sorting on the spot while the list is open there is alot of space that can be added.

      6 votes
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        I agree to the terms of service
        Signed in as (Sign out)

        We’ll send you updates on this idea

        0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
      • If a database is offline, it should not appear in the prompt list.

        If a database is offline, it should not appear in the prompt list.

        4 votes
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          I agree to the terms of service
          Signed in as (Sign out)

          We’ll send you updates on this idea

          0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
        • Add option to make table aliases not bracketed

          I would like the ability to automatically put brackets around all SQL objects, except for table/function aliases

          Example

          SELECT
          A.[Foo],
          B.[Bar],
          [Foobar] = A.[Foo] + B.[Bar]
          FROM
          [dbo].[MyTableA] A
          CROSS JOIN [dbo].[MyTableB] B

          instead of the current all or nothing of

          SELECT
          [A].[Foo],
          [B].[Bar],
          [Foobar] = [A].[Foo] + [B].[Bar]
          FROM
          [dbo].[MyTableA] [A]
          CROSS JOIN [dbo].[MyTableB] [B]

          3 votes
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            I agree to the terms of service
            Signed in as (Sign out)

            We’ll send you updates on this idea

            0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
          • no double AS table alias

            I have the following statement:
            SELECT * from dbo.table1 AS t1

            The option to auto-apply table aliases (including AS) is enabled

            When I change table1 to e.g. table1_details (using code completion) it changes my query to

            SELECT * from dbo.table1_details AS td AS t1

            which is syntactical incorrect (because of the double AS)
            -> please either skip the add-alias (if there is already one) or change the existing alias to the new one

            I'd prefer if you would not add another alias because sometimes I want to run the same query (same columns in the WHERE condition) for different tables…

            3 votes
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              I agree to the terms of service
              Signed in as (Sign out)

              We’ll send you updates on this idea

              0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
            • decimal

              Hi, It would be great, if you add precision and scale on numeric/decimal data types - column hint and table summary.

              3 votes
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                I agree to the terms of service
                Signed in as (Sign out)

                We’ll send you updates on this idea

                2 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
              • Configurably include table hints when auto-completing a table

                For a specific database/server, automatically append configurable table hints (or free text) such as with(nolock) to any table name that is auto-completed.

                3 votes
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  I agree to the terms of service
                  Signed in as (Sign out)

                  We’ll send you updates on this idea

                  0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
                • Datetime columns

                  Can we see columns and their datatypes in SQL Prompt intellisense for a table ordered by datatype rather than column? We're in an ETL environment and would like to see all datetime columns for a table in a row for example.

                  2 votes
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    I agree to the terms of service
                    Signed in as (Sign out)

                    We’ll send you updates on this idea

                    0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
                  • Specify Specific Databases on Server to examine

                    Give the user the option to select specific DB from Server as they may not have access to all. Would help avoid error with permissions

                    2 votes
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      I agree to the terms of service
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                      1 comment  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
                    • Don't alias objects with reserved words

                      CREATE TABLE dbo.GrumpyOld (col1 int)

                      SQL Prompt will alias the table as GO, which causes problems because it's a batch separator.

                      Thanks!

                      2 votes
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        I agree to the terms of service
                        Signed in as (Sign out)

                        We’ll send you updates on this idea

                        1 comment  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →

                        Hi Erik,

                        SQL Prompt already avoids reserved words when generating aliases, eg if you had a table called ApplicationSettings it wouldn’t generate AS for the alias as it would be invalid SQL.

                        GO is a bit of an odd case since it’s not technically a reserved word in SQL (In your example “SELECT GO.col1 FROM dbo.GrumpyOld GO” is valid)

                        But we agree that using GO as an alias is asking for trouble (and I think Prompt’s suggestions might be tripping up on it!) so it’s no longer generated as an alias in the latest beta version of SQL Prompt 7.3. You can find out more and download the beta from https://forums.red-gate.com/viewtopic.php?f=169&t=79994

                      • Fix issue related to incorrect results from "Qualify Columns Names with Aliases" when Pivot/Unpivot is involved.

                        I ran into an issue today where the automatic qualifying of colun names when an unpivot table was being referenced resulted in an incorrect qualifying alias name being applied to a column. The resulting SQL did not execute correctly and SQL Prompt actually introduced a bug in my code that was troublesome to find and fix. After fixing the code the first time by removing the incorrect alias, I determined it was SQL Prompt that was the culprit because after reformatting the code the bug was present again. I had to prefix the columns with the correct prefix to prevent…

                        1 vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          I agree to the terms of service
                          Signed in as (Sign out)

                          We’ll send you updates on this idea

                          0 comments  ·  Qualify object names  ·  Flag idea as inappropriate…  ·  Admin →
                        • Don't see your idea?

                        Feedback and Knowledge Base