February 14, 2011 at 7:25 am
Hi,
I have a select query to retrieve the data. I want to export the data into a .csv file in a specified location thru query (Not Manually saving into csv file or using the BCP utility).
Kindly suggest.
Ryan
//All our dreams can come true, if we have the courage to pursue them//
February 14, 2011 at 7:27 am
If you need this is a repeatable and automated fashion , as i guess as you say Not manually, then SSIS is probably a safe bet.
February 14, 2011 at 7:30 am
Actually I want it from the query in SSMS specifying the location name and this is not repeatable.
Ryan
//All our dreams can come true, if we have the courage to pursue them//
February 14, 2011 at 7:38 am
February 14, 2011 at 7:51 am
Hi,
you can create a job and run the query in the job. Then use xp_sendmail with the parameter @attach_results.
IT should be repeatable as per the frequency of the job set by you. but remeber this feature is deprecated for future versions.
:w00t:
February 14, 2011 at 1:31 pm
This is a common request. In my opinion "in-process EXPORT" functionality is a feature that would be very useful.
See this similar post:
http://www.sqlservercentral.com/Forums/Topic1061652-392-1.aspx
Here are some workarounds in preference order:
1. SSIS / DTS called by SQL Agent or other external caller
2. bcp called by SQL Agent or other external caller
3. bcp via xp_cmdshell called within stored procedure (security considerations)
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply