I have spent few hours searching with no luck today. What I need to do is to write a t-sql query which will be executed from within SSMS and which supposed save an output to a file. I have full admin access to the sql server 2008 r2 as well as to the OS (I believe Win 2008 Server)
I cannot use commandline, batch files etc. It needs to be done straight from SSMS as an execution of a t-sql script.
It doesn't even have to be pretty :-) It just needs to do the job.
I would very appreciate any help.
Regards Mariusz