suppress underline in output file

  • Hello,

    Is there a way in SQL 2000 to suppress the -------- type undeline when you output results of a query to a text file?

    Is was expecting there to be an option like 'set nocount on' that would do this, but cannot find one.

    Thanks

    Paul Salmon

     

  • In Query Analyzer, Click on Tools-Options and on the Results Tab, Uncheck the Print Column Headers box.

     


    I feel the need - the need for speed

    CK Bhatia

  • Thanks for your help.

    That works ok for ad hoc reports, but I've just tried running query through EM as a job and still get the underline. This also appears to be the case when running with osql command line.

    I have ended up using VB6 to do it anyway as that fits the purpose better!

    Thanks

    Paul Salmon

  • IMHO, text output has hideous formatting and is not good for permanent reports anyway. I prefer sp_makewebtask to create HTML file in the job, but you can do it in VB if that suits you better.

  • The recipient of the files want comma or tab delimited format only, but thanks for the suggestion.

     

     

  • You could use your query in a DTS and export the file without the column names. I believe its a checkbox called First Row has Column Names on one of the DTS Export Wizard screens.

     


    I feel the need - the need for speed

    CK Bhatia

  • Or... Use OSQL with the -h-1 option.  Don't forget to set the -s option to a tab... you can't do THAT from the command prompt... you will need to make a batch file to run the OSQL... which you should do anyway...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply