I have been assigned a task to have a query, which a developer wrote, run against a database on a daily basis and have it generate a csv file to be placed on a network drive.
Another tech suggested I use the xp_cmdshell to do this, but when I tried on a test server it said that the extended properties are not enabled.
We are running SQL 2008 here
The senior DBA suggested that we use PowerShell to do the task, but my powershell skills are not that great.
Do you have any suggestions on how I can accomplish this job?
Your help is appreciated
What does the file have to look like? For example, should column headers be included?
What about the data? For example, is there any possibility that the data might include a comma in it? If so, is a TAB delimited file an option?
Last but not least, what is the end use of the data? Is it for imports to something like Excel or is it a file that will be transmitted to somewhere else?
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
Although they tell us that they want it real bad, our primary goal is to ensure that we dont actually give it to them that way.
Although change is inevitable, change for the better is not.
Just because you can do something in PowerShell, doesnt mean you should. Helpful Links:
How to post code problemsHow to post performance problemsForum FAQs