How do I export a sql server database into a csv file

I need to get a database with at least 10 tables exported into a flat file from Sql Server 2005 how would I do this?
sikyalaSenior Database AdministratorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Guy Hengel [angelIII / a3]Billing EngineerCommented:
into 1 single file? or 1 file per table?

you can use sqlcmd command line tool coming with sql server to export, see this article:

in short:
SQLCMD -S YourSQLServer -d YourDatabase -U YourUserName -P YourPassword -Q “Your Query” -s “,” -o “C:\Yourfilename.csv”

Open in new window

all the options of sqlcmd tool:
sikyalaSenior Database AdministratorAuthor Commented:
I want to export all the tables and any other objects into a single file

Thanks I will look at the link
Guy Hengel [angelIII / a3]Billing EngineerCommented:
what "export" ... maybe you want to backup the full database, actually?
what do you want to achieve with that "export"?
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

sikyalaSenior Database AdministratorAuthor Commented:
I need to load the database into an oracle database
Guy Hengel [angelIII / a3]Billing EngineerCommented:
then you cannot just export to 1 single file.
it needs to be 1 file per table.

anyhow, I would suggest you check this official Oracle Tool step-by-step guide:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sikyalaSenior Database AdministratorAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.