I have 2 files. One contain list of the file names needs to be created and other file contain file name and the content(separated by tab) which I need to put it like below:
File 1:
AAA.txt
BBB.txt
CCC.txt
DDD.txt
File 2:
AAA.txt Select * from abc;
AAA.txt Delete from abc;
CCC.txt select * from xyz;
DDD.txt select * from efg;
Now I need to create File as AAA.txt (as in the File 1) and put the corresponding content which is in the File 2. Please note the no of lines for each file in File 2 may vary but it will be grouped by File name.
Thanks
sqlstatements but the code before the select statement threw me off. Please reformat your code and I will debug your code and post a reply.