Select Categories Below
Advertisement
Start Your Own Q&A Site
Create your own Q&A site easily, allowing you to quickly grow a new community around any subject matter or generate new organic traffic for your existing website.
Status: Open Points: 125 Time: 12:53 - Feb 02, 2009
mahmoodm7
is there any SQL command to export my database to a text file delimited by comma
Categories:
Add Categories
When adding more than one category, separate them with commas.
Suleman
Date:: Jul 16, 2010
Time:: 10:33
Hi Mahmoodm7, If you are doing this from SQL Server query editor then you would need to run the below command EXEC xp_cmdshell 'bcp "select col1, col2,col3 from table_name" queryout "C:\results.txt" -S<servername\Instance_name> -U<enter_user_name> -P<enter_password> -t,' If you want to run this from the command prompt on the server/client/remote server then run this at the command prompt go to start menu --->run ---type cmd hit enter and copy paste this command and change parameters as per your server and tables/column names and hit enter. 'bcp "select col1, col2,col3 from table_name" queryout "C:\results.txt" -S<servername\Instance_name> -U<enter_user_name> -P<enter_password> -t, -t is used to specify what is the column delimiter and in this case its ,
admin
Date:: Mar 31, 2012
Time:: 13:57
The question looks to be abandoned by the user who asked it. If no action is taken within 2 days, a Quomon Moderator will consider closing the question and distributing the points. The Quomon Team
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
how to export a database from ms sql server to access?
How do I upload and count different database files in ASP?
How do i link textbox to datagridview without a database or dataset in visual...
How do I restore a database on sql server through the command prompt?
change owner of objects in ms sql server
You have 100 characters to use
Rank
Expert
Points
1.
10354
2.
6493
3.
5596
4.
4848
5.
3487
6.
2840
7.
2770
8.
2303
9.
1820
10.
917
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software