Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 generating the csv files

Author  Topic 

jeer
Starting Member

32 Posts

Posted - 2008-03-31 : 05:37:32
hi

how can we generate the data in csv files of database tables by using sql query?


regards

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-03-31 : 05:55:16
By using osql/bcp utitlity.

See this: http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

jeer
Starting Member

32 Posts

Posted - 2008-03-31 : 06:44:13
quote:
Originally posted by harsh_athalye

By using osql/bcp utitlity.

See this: http://www.simple-talk.com/sql/database-administration/creating-csv-files-using-bcp-and-stored-procedures/

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"



please guide me that how can i run xp_cmdshell.

regards
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2008-03-31 : 08:55:31
exec master..xp_cmdshell '....'
You will need to allow xp_cmdshell to be run (configuration manager) and have pemission to run it.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -