Delimitter
Hi , I have a package where i am currently using Script task within which i am using BCP and XP_CMDshell commands to convert a data froma table into a file by passing delimitter dynamically. My question is since my requirement is to convert the data into delimitted seperated values, can u tell me is their any other means of converting dat a from database table into a delimitted file (Dynamic delimitter) other than BCP command Thanks, SanthoshPlease have look on the comment
August 21st, 2012 7:41am

I thnk your BCP would be retrieving the dataset and then calling a .exe from the xp_commandshell to pass/travers the data and subsequently populate the new file as you require the delemiter to be dynamic, else BCP alone could have been sufficient I would say BCP is the best way as it would be fastest to produce a file the only thing to be considered is are you not generating the file You can also do all the things in a single .exe, and call it via a batch file or via anything else a) So effectivley in you console application you will open connection to DB, travers all the rows and write a file as you want. b) Or create you BCP command dyncamically by appenindg the delimter to the command on the fly this can eihter be done again in Consile application/ SSIS(using script task or varaibles), and then execute the BCP command Abhinav http://bishtabhinav.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2012 7:54am

Hey Abhinav, Yes using BCP is bet way and i am still using it, But is their any other way where i can dump data into a say flat file by giving delimitter dynamically.Please have look on the comment
August 21st, 2012 8:18am

Hey Abhinav, Yes using BCP is bet way and i am still using it, But is their any other way where i can dump data into a say flat file by giving delimitter dynamically. Please have look on the comment You can do that using Data Flow Task, and within that using OLE DB Source (your SQL Server) and Flat File Destination. here is a quick link: http://decipherinfosys.wordpress.com/2008/07/23/ssis-exporting-data-to-a-text-file-using-a-package/ Please mark the post as answered if it answers your question
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2012 8:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics