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?

You've used all your votes and won't be able to post a new idea, but you can still search and comment on existing ideas.

There are two ways to get more votes:

  • When an admin closes an idea you've voted on, you'll get your votes back from that idea.
  • You can remove your votes from an open idea you support.
  • To see ideas you have already voted on, select the "My feedback" filter and select "My open ideas".
(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. Enhance tab to expand wildcards when using aliased tables

    Further to the idea presented here http://redgate.uservoice.com/forums/94413-sql-prompt-feature-suggestions/suggestions/1712871-enhance-press-tab-to-expand

    I would like to see a further enhancement

    If I have a query such as

    select *
    from table t1
    join table2 t2 on t1.id = t2.id

    and I tab-expand the *, then the columns will be prefixed with the alias name, however if I have limited the query to

    select t2.*
    from table t1
    join table2 t2 on t1.id = t2.id

    and tab-expand, then SQL Prompt doesn't use the alias, it uses the tablename. I want to see the alias.

    10 votes
    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)
      You have left! (?) (thinking…)
      1 comment  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
    • Remove/rename duplicate columns in wildcard expansions

      It'd be awesome if SQL Prompt could have the ability to automatically (or via key command) remove and/or rename columns that are duplicated when joining tables.

      That is, if you have three (3) tables defined and filled as such:

      DROP TABLE dbo.Grades
      DROP TABLE dbo.Student
      DROP TABLE dbo.Course

      CREATE TABLE dbo.Student
      (
      sid INT IDENTITY(1,1) NOT NULL,
      fname VARCHAR(10),
      lname VARCHAR(50),
      CONSTRAINT pk_Student PRIMARY KEY CLUSTERED (sid)
      )

      CREATE TABLE dbo.Course
      (
      cid INT IDENTITY(1,1) NOT NULL,
      cname VARCHAR(50),
      CONSTRAINT pk_Course PRIMARY KEY CLUSTERED (cid)
      )

      CREATE TABLE dbo.Grades
      (
      sid INT NOT NULL,
      cid INT NOT NULL,
      grade VARCHAR(2)…

      4 votes
      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)
        You have left! (?) (thinking…)
        0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
      • Enhance tab to expand and name aliases table as prefix

        When expanding a * in
        SELECT * FROM dbo.Objekt AS O JOIN dbo.ObjektArtikel AS OA ON OA.ObjektNr = O.ObjektNr AND OA.DelObjekt = O.DelObjekt AND OA.LeveransNr = O.LeveransNr
        I get
        SELECT O.ObjektNr ,
        O.DelObjekt ,
        O.LeveransNr ,
        -- /.../
        OA.ObjektNr ,
        OA.DelObjekt ,
        OA.ArtikelNr ,
        OA.LeveransNr ,
        -- /.../
        Which is great, but that would produce an error if inserted directly into a table..
        "Column names in each table must be unique. Column name 'ObjektNr' in table '#ArticlesBelongingToPreBundles' is specified more than once."

        If there was an option to prefix names with table alias like this...

        SELECT O.ObjektNr O_ObjektNR,
        O.DelObjekt O_DelObjekt, …

        4 votes
        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)
          You have left! (?) (thinking…)
          0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
        • Fix "expand wildcards" when there is no space after the wildcard

          If there is no space between a wildcard (e.g., SELECT *) and the next statement, then when Format SQL expands the column list there will be no space between the last column and the next word, causing the script to error.

          I found this out the hard way when trying to format a gnarly set of code from our offshore team - an example to reproduce the issue is below.

          CREATE TABLE #MyTable (MyIntColumn INT, MyVarcharColumn VARCHAR(50))

          SELECT *INTO #MyOtherTable -- note the lack of a space between the * and INTO
          FROM #MyTable mt

          DROP TABLE #MyTable
          DROP TABLE…

          3 votes
          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)
            You have left! (?) (thinking…)
            0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
          • Collapsible fields in SELECT, UPDATE and INSERT

            When working with data warehouses one has to often write queries against tables with many, many columns. The best practice tells us to always exactly specify the columns one wants in the SELECT query. Problem is that there are so many columns to write out that scrolling becomes excessive and tedious. I've been wondering... Could SQLPrompt somehow turn the stuff between SELECT and FROM collapsible with little effort on part of the dev? A keyboard shortcut would be perfect. This could also work for, say, UPDATE between SET and FROM. What about collapsible field in INSERT? I always write out…

            2 votes
            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)
              You have left! (?) (thinking…)
              0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
            • Expand JOIN * into joining on all collumns

              When joining two tables with the same structure, it would be nice to be able to expand "JOIN *" into a JOIN clause with all columns.

              This is most useful when investigating issues or maintenance.

              2 votes
              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)
                You have left! (?) (thinking…)
                0 comments  ·  Expand wildcards  ·  Flag idea as inappropriate…  ·  Admin →
              • Don't see your idea?

              Feedback and Knowledge Base