Results 1 to 2 of 2

Thread: Removing headers from Query Analyzer Output

  1. #1
    Trevor Guest

    Removing headers from Query Analyzer Output

    Hi. How can I display output from a simple SQL query in Query Analyzer so that the column heading/broken underline
    appearing above the column values is not displayed? Something akin to "set heading off".

    Thanks


  2. #2
    Gary Andrews Guest

    Removing headers from Query Analyzer Output (reply)

    I don't know that you can exactly do what you want to do, but here may be a couple
    of alternatives:

    First, assuming that you specifically mean you don't want to see the column headings
    and underlines in the Query Analyzer result pane.

    1. In Query Analyzer, select from menu bar "Query"
    2. From its drop down window, select "Results in Grid"
    3. When you format your query, assign each column an alias of ' '
    i.e. use pubs
    select au_lname as ' '
    from authors
    Now when you execute your query, the result pane will contain a top row, grey, without any contents
    and your data will all be in rows were the background is white (on my machine). Very easy to
    distinguish the data.

    Second, assuming that you want the data exported from query anaylzer.

    1. In Query Analyzer, select from menu bar "Query"
    2. From its drop down window, select "Results in Grid"
    3. Format your query
    i.e. use pubs
    select au_lname as ' '
    from authors
    4. This of course produces the output with column names in the results pane.
    5. CLICK in the results pane. Important
    6. Select FILE from QA menu bar.
    7. Select Save As from drop down menu
    8. This produces a pop-up window titled Save Grid Results
    9. Select type of column delimiter you would like the file to have (comma, or tab)
    10. Specify file name. I.e. Grid_Results.txt
    11. Click Save button.

    If you now go and examine the file created, you will find no column headings or
    underlines, just the data.

    HTHs Gary


    ------------
    Trevor at 3/14/01 5:37:56 PM

    Hi. How can I display output from a simple SQL query in Query Analyzer so that the column heading/broken underline
    appearing above the column values is not displayed? Something akin to "set heading off".

    Thanks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •