question

ljhopkins avatar image
ljhopkins asked

Saving procedure results to CSV

I have a query that returns a list of active Locations and Location Types. I will in turn loop through this list and call a stored procedure with the parameters of the Location and Type. I need to save the resulting procedure results to a CSV on the local server c:\temp\LocationResults. what is the easyist way to save the results to a csv Locaiton_type.CSV without having the manually save each out put as a csv. (i want to be able to have this running on a scheduled task or the such.

csvsql2014automation
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
anthony.green avatar image
anthony.green answered

BCP, SSIS, PowerShell are the immediate things that come to mind for this sort of stuff

10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.