You have chosen to sponsor your bid up to a maximum amount of .
I have a query that I turned into a stored procedure in Microsoft SQL Server 2005 that is running to do calculations and I want the result set to be exported to a csv file. The stored procedure is being executed by a sql job. I can not use xp_cmdshell due to security violations. I would like to use bcp but it appears that it needs to use xp_cmdshell. I really don't want to use a batch file to do it. I would like to have two methods to accomplish this by a sql job. One method I would like to use CLR integration because this is enabled on the server. I don't care what the other method is but I just want to get the job done so I am open to suggestions. I only ask for two because I want to see what is easiest. I need to get this done within a few hours to a day because it is simple. I know this should be able to be accomplished with a few lines of code but just can't get what I had to work. This should be able to be performed by adding a few lines of code at bottom of procedure. Let me know your thoughts and time frame to work with me on it.