RE: Exporting Data

RE: Exporting Data

 

  

You can also use BCP.exe which will take a query as input and output to
file the results, or will bulk out an entire table to file.

Another trick is to create a view and then bcp the view out. This
allows for much more flexibility if you need to join several tables to
produce one resultset or you need to 'customize' your output if the
data/structure of the table is not how you want your output
structured...


-----Original Message-----
From: Melissa King
[mailto:mssqldba-ezmlmshield-x38783016.[Email address protected]
Sent: Wednesday, March 28, 2007 12:03 PM
To: LazyDBA Discussion
Subject: Re: Exporting Data

Or, using Query Analyzer, you can select from the Query menu at the top
to send the results of your query to a file.





"Nick" <mssqldba-ezmlmshield-x17947653.[Email address protected]
03/28/2007 03:00 PM

To
"LazyDBA Discussion" <[Email address protected]
cc

Subject
Re: Exporting Data






Ryan, you can use a DTS job to export into several formats.





"ryan"
<mssqldba-ezmlmsh
ield-x23785170.x1
To

[Email Address Removed] "LazyDBA Discussion"
.com> <[Email address protected]

cc

03/28/2007 01:57
PM
Subject

Exporting Data










Hi all -

Please excuse my ignorance. I am very new to this db stuff and obviously
I don't know what I am doing, but I am glad to have found this list
because I have learned a lot from just lurking over the posts.



I have a question I am hoping someone can either help me with or tell me
it isn't possible. I've done a bit of searching and think the answer
will be the later, but here it goes:



Is there a way to write a query and have it export the result to a csv
file (or something similar)? I am able to do this with no problems in
MySQL using 'into outfile' - but I can't seem to find a way with MSSQL
2000.



Any ideas/suggestions?



Thanks,

Ryan



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



This message and any attachments are solely for the use of the
individual
or entity to which it is addressed and may contain information that is
privileged or confidential. If you are not the intended recipient, any
disclosure, use or distribution of the information contained herein is
prohibited. If you have received this communication in error, please
notify the sender by reply e-mail and immediately delete this message
and
any attachments. In the event this document(s) contains technical data
within the definition of the International Traffic in Arms Regulations,
it
is subject to the export control laws of the U.S. Government. Transfer
of
this data by any means to a foreign person, whether in the United States

or abroad, without an export license or other approval from the U.S.
Department of State, is prohibited.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



------------------------------------------------------------------------------
NOTICE OF CONFIDENTIALITY
The information contained in this communication and any accompanying document(s) is proprietary and confidential and is intended solely for the above-named individual or entity. If you are not the intended receiver, recipient or entity, you are advised that any distribution, copying, disclosure or communication of this email is strictly prohibited. If you have received this email in error, please contact me at the telephone number listed above or 858.716.1500.
==============================================================================


MS Sql Server LazyDBA home page