>>>>>>HI
>>>>>>
>>>>>>I'm working on some old sql thats using xp_cmdshell to query some data and then output results to series of csv files using bcp.
>>>>>>
>>>>>>Is SSIS a better way to do this sort of thing.
>>>>>>
>>>>>>Thanks
>>>>>>
>>>>>>Nick
>>>>>
>>>>>Yes, SSIS is a better way.
>>>>
>>>>You're being like Sheldon I see.
>>>>
>>>>Why is it the best way ?
>>>
>>>Because opening xp_cmdshell presents security risk. It is disabled by default. In addition, SSIS offers error logging.
>>
>>Ok
>>
>>I'm having a look at SSIS.
>>
>>Do you have any idea how I would split my output csv files to give seperate files depending on the data selected.
>>
>>So lines with a type of AV01 would go in AV01.csv and AV02 would go in AV02.csv
>>
>>Thanks
>
>The beautiful thing about SSIS is you have pretty much complete programmatic control at every step of the process.
>
>Kevin is the authority here ( I'd recommend his Code Magazine Baker's Dozen article in two parts on SSIS ) . The AppDev course is pretty comprehensive ( $99 for all their stuff for a year ) and Pluralsight ( $29 a month ) has SSIS course as well.
>
>If you just need a one-off, just Googling around should yield lots of stuff
>
http://www.bimonkey.com/2009/06/the-conditional-split-transformation/>
http://sqlblog.com/blogs/andy_leonard/archive/2009/02/20/ssis-expression-language-and-the-conditional-split-transformation.aspxThanks Charles.
You watching game of thrones ?.
I'm reading the books and enjoying them mostly.