Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

exporting sql table to .txt document 1

Status
Not open for further replies.

mbcmike

Programmer
Sep 9, 2005
34
US
I haven't actually started writing this yet because I'm not sure where to start or if this is possible. If anyone can point me in the right direction as far as what possible function(s) I would need to do this I would greatly appreciate it. Then I will research it further, try it out, and if I have a problem I'll come back and post some code.

It seems quite simple to me...I have a sql table of 500ish records. I want ALL of these records to be placed into one .txt file. I'm assuming I would need to deliminate them out some how.

Thanks
 
SQL Enterprise Manager makes that very easy to do. All you have to do is right click on "Tables", select "All Tasks", then "Export Data". Just choose to export to a text file and follow the prompts. Depending on the data, you may want to choose a delimiter other than "Comma", which is the default (if you have commas in your data that can cause problems when you try to import it elsewhere). If this is something that will need to be done on a regular basis just create a DTS package and you can run it anytime you need to (or schedule it to run automatically).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top