merge two flat files of same file format
Hi I tryed to put as below in batch file .. Code Snippet COPY "C:\Docs\tblExtract.txt"+"C:\Docs\Destiny.txt" "C:\Docs\Destiny.txt" I am getting the result as tblExtract is copied to tblDestiny. My requirement is to merge and append the records from tblExtract which is exising already in Destiny.txt kindly suggest me on DOS code.. based on the below forum, i have used the above code http://social.msdn.microsoft.com/Forums/en/sqlintegrationservices/thread/d70bd8b9-d3b1-4ba3-b37a-6ddefddd45ec ShanmugaRaj
September 25th, 2012 6:23am

Please correct me if i'm wrong:: ---------- File 1: Name, age, mobileNo A,25,9900990090 -------------- File2: Name, age, mobileNo B,27,8800990099 ------------- and you want your OUTPUT like this Name, age, mobileNo A,25,9900990090 B,27,8800990099 ---- If yes .. then you don't need to use that code.. better use UNION ALL.. let us know your observation.. -- Let us TRY this | My Blog :: http://quest4gen.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2012 6:33am

Hi ShanmugaRaj, You can try using the MERGE task / Union All in SSIS. Here is the link: http://msdn.microsoft.com/en-us/library/ms141703.aspx More here: http://www.bimonkey.com/2009/07/the-merge-transformation/ Please vote as helpful or mark as answer, if it helps Cheers, Raunak | t: @raunakjhawar | My Blog
September 25th, 2012 6:37am

Should your command look like this COPY "C:\Docs\tblArea_S1.txt" + "C:\Docs\tblArea_S2.txt" "C:\Docs\tblArea_destination.txt" http://btsbee.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2012 6:43am

My command goes lije this.. Code Snippet COPY "C:\Docs\tblExtract.txt"+"C:\Docs\Destiny.txt" "C:\Docs\Destiny.txt" I am getting the result as tblExtract is copied to tblDestiny. My requirement is to merge and append the records from tblExtract which is exising already in Destiny.txt ShanmugaRaj
September 25th, 2012 9:24am

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

Other recent topics Other recent topics