var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Getting data off SQL server to CSV
I have a SQL string that returns a record set through Query Anal.
I need to return that recordset to a CSV file then EMAIL that.
I was going to use DTS as that is the company Standard to MOVE data.
This didn't work as the SQL uses a #temptable and couldn't map using the GUI DTS.
I used save as to a BAS file from gui and then changed the SQL within the BAS file.
This is a valid solution However is presented with the same problem is there a different/better way to skin this cat.
FYI cannot create a table to replace temptable without 400000 signoffs. Can do it but don't care to tackle at this time.
I have a similar requirement to email a resultset once a month. What I did was create a Job with three steps:
- Run the query and save the results to a file
- Email the file using xp_sendmail
- Email myself a reminder to update the query - again, using xp_sendmail
I then scheduled the job to run on the last day of every month.