Showing posts with label analyzer. Show all posts
Showing posts with label analyzer. Show all posts

Thursday, March 29, 2012

Exporting Query Analyzer data with column headers...?

Hi,

Does anyone out there know how to do this? I've been banging head for
awhile now trying to answer this seemingly simple question.

tia,

Mike[posted and mailed, please reply in news]

Ixnay (mscgloss@.yahoo.com) writes:
> Does anyone out there know how to do this? I've been banging head for
> awhile now trying to answer this seemingly simple question.

Export to what?

There are two ways that you may want to investigate. Both are found under
Tools->Options->Results.

Here you can select output to file.

You can also for output to text select which delimiter to use. For instance,
you can select tab as delimiter. Then in the results tab press CTRL-A
followed by CTRL-C, and if Excel where you want the data, you go there
and press CTRL-V in cell A1.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||I had the same problem. Then I discovered that if you make the query
in Enterprise Manager and copy THOSE results, you get the column
headers.

Go figure...

On 23 Jan 2004 12:44:45 -0800, mscgloss@.yahoo.com (Ixnay) wrote:

>Hi,
>Does anyone out there know how to do this? I've been banging head for
>awhile now trying to answer this seemingly simple question.
>tia,
>Mike|||Erland, just want to thank you -- output to text with the tab
delimiter works exactly as you stated. I much prefer writing SQL in
Query Analyzer (as opposed to Enterprise Manager), so this is going to
be my method from now on! :)

On Fri, 23 Jan 2004 22:56:19 +0000 (UTC), Erland Sommarskog
<sommar@.algonet.se> wrote:

>[posted and mailed, please reply in news]
>Ixnay (mscgloss@.yahoo.com) writes:
>> Does anyone out there know how to do this? I've been banging head for
>> awhile now trying to answer this seemingly simple question.
>Export to what?
>There are two ways that you may want to investigate. Both are found under
>Tools->Options->Results.
>Here you can select output to file.
>You can also for output to text select which delimiter to use. For instance,
>you can select tab as delimiter. Then in the results tab press CTRL-A
>followed by CTRL-C, and if Excel where you want the data, you go there
>and press CTRL-V in cell A1.

Sunday, February 19, 2012

Export Table to Text File Using Query Analyzer

I can use DTS and BCP, but I am trying to export a table into a text
file through Query Analyzer (I need to show documentation in QA). DTS
uses EM and does not leave a "paper trail"
I am looking for the reverse of BULK INSERTHi
I am not sure what you are wanting to audit regarding your paper trail.
There is no BULK EXPORT command. If your DTS package is executed through a
job then you will have the job history. To use a stored procedure to start
the job/package, then you can start a job using sp_start_job or execute a DT
S
package through xp_cmdshell or the sp_OA* procedures see
http://www.databasejournal.com/feat...cle.php/1459181
John
"Justin Chandler" wrote:

> I can use DTS and BCP, but I am trying to export a table into a text
> file through Query Analyzer (I need to show documentation in QA). DTS
> uses EM and does not leave a "paper trail"
> I am looking for the reverse of BULK INSERT
>