What are the challenges you face when working across database platforms? Take the survey
Options

Configure SELECT *<TAB> results

Matthew.WilkersonMatthew.Wilkerson Posts: 45
edited July 27, 2007 6:54AM in SQL Prompt Previous Versions
In version 2.0 we could change the format of the results of pressing tab after a SELECT * statement. Can this be added back to version 3? My company's standards are to put the commas in front of the columns.

EXAMPLE:
When I type:
SELECT
  *
FROM
  pubs.dbo.pub_info

then press tab after * I get:
SELECT
  pub_id,
  logo,
  pr_info
FROM
  pubs.dbo.pub_info

instead of:
SELECT
  pub_id
  , logo
  , pr_info
FROM
  pubs.dbo.pub_info

Comments

  • Options
    Have you tried SQL Refactor , it gives na enormous number of ways to reformat code and make things more legible

    It complements SQL Prompt nicely
  • Options
    Thanks for your comments Matthew. SQL Prompt does not have an option for where to place commas. We are trying to keep the options dialog from getting too complex, but we will look into it for later versions.

    For the moment, as Mike suggested, SQL Refactor does have the ability to refactor SQL to place commas before or after columns, along with lots of other formatting/refactoring stuff that complements SQL Prompt well. If you'd like to try it, it's available for download at:

    http://www.red-gate.com/products/SQL_Refactor/index.htm
    Jason Crease
    Red Gate Software
Sign In or Register to comment.