Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Remove the '- - -' from the query results window.

Author  Topic 

mdelgado
Posting Yak Master

141 Posts

Posted - 2002-07-12 : 10:55:49
Hello.

Can anyone tell me how to remove the dashes in between the Column name and result set every time I run a query?

I'm using xp_sendail to send a result set in .csv format and when the recipient opens the attachment in Excel, there is one extra row in between the Column names and result set making it difficult to sort in Excel.

Any help would be much appreciated.

thanks.

MakeYourDaddyProud

184 Posts

Posted - 2002-07-12 : 11:01:54
Wouldn't the heading also cause a problem for your sorting as well, not just the dashes? You can only remove the complete heading, i.e. Title and dashes...

Daniel Small MIAP
www.danielsmall.com IT Factoring
Go to Top of Page

mdelgado
Posting Yak Master

141 Posts

Posted - 2002-07-12 : 11:03:04
If the dashes were not there, I could sort on the first row which contains the field names.

Go to Top of Page

cat_jesus
Aged Yak Warrior

547 Posts

Posted - 2002-07-12 : 11:06:04
I assume this is in QA.

Go to conneciton options, advanced and change column aligned to csv

Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-07-12 : 11:06:34
I'd recommend testing the various parameters of xp_sendmail, like @no_header or @attach_results, to see if they provide the desired output. They're documented in Books Online. Otherwise you'll probably have to use another method to export the data and then attach it to the xp_sendmail message.

Go to Top of Page

mdelgado
Posting Yak Master

141 Posts

Posted - 2002-07-12 : 11:08:30
I'll check it out.

Thanks guys...

Go to Top of Page
   

- Advertisement -