views:

50

answers:

2

Hi,
I need to export all data from a database into a text or csv file from MSSQL Server2000. I have read from msdn and found that a tool 'bcp' could be useful for exporting data into text file. But MSSQL Server 2000 is not supporting 'queryout' keyword for it on EnterpriseManager Editor.

Is there any other possible way with which i can copy all data from a table in MSSQL Server2000 to a textfile or a csv file ??

+1  A: 

BCP is a command line utility - it isn't run as a SQL query.

Run it from the command line (Start > Run > CMD)

Ed Harper
+1  A: 

OK first in SQL Server 2000, never ever ever use the editor in Enterprise Manager to write or run queries. It can really lock up your system. If you are runnning queires, do them in Query analyzer.

You can use the export wizard in Enterprise manage to create the file. Just right click on the database you want to use, go to all tasks and you will see Export data. Follow the wizard through the steps. You can also save this as a DTS package if you are planning to run this repeatedly. Then you can schedule the DTS pacakge to run at a set time.

HLGEM