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
 General SQL Server Forums
 New to SQL Server Programming
 Export query to cvs file

Author  Topic 

jpost
Starting Member

43 Posts

Posted - 2012-07-26 : 10:34:17
I am looking for a way to export a query to a excel spreadsheet of csv file. Honestly, I am not even sure where to begin. I would love to automate this task, but again and very new to SQL management. Any help would be appreciated.

webfred
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-07-26 : 11:04:02
something helpful to find here?
http://www.sqlteam.com/search.aspx?cx=011171816663894899992%3Aaow51lf_dim&cof=FORID%3A9&q=excel+export


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-07-26 : 11:30:20
bcp or ssis come to mind.
bcp is simpler if your environment allows it.

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

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-26 : 11:31:15
you can use several approaches

1.SSIS export import
2. bcp
3. OPENROWSET

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -