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
 Transact-SQL (2005)
 Export data in CSV

Author  Topic 

srivatsahg
Yak Posting Veteran

71 Posts

Posted - 2009-09-23 : 05:01:13
Hello Experts

I need to export few tables + customized views into a CSV file.
I also need to automate this process of export every night.

With the SQL Import and Export Wizard i can export the whole of a table but, i need to export just the data of my interest.

Could anyone out there help me out with the same.


Regards
Vatsa

sanoj_av
Posting Yak Master

118 Posts

Posted - 2009-09-23 : 05:07:18
You can export just the data of your interest by selecting the query option in SQL Import and Export Wizard and write your own query for the data retrieval
Go to Top of Page

Lumbago
Norsk Yak Master

3271 Posts

Posted - 2009-09-23 : 07:06:05
Look up BCP in books online, very powerful tool for dealing with large chunks of flat file data.

- Lumbago
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-23 : 08:06:29
And to automate the process make use of a job

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -