Read .txt file (in Java) and edit it
Posted on 2008-11-16
I need to do the following (preferrably in java)
Read a .txt file containing sql input data in a messed format. The format currently is :
Some of the values also have incorrect formating.
I need to be able to read this file of mine in Java and edit it.
Some of the things I need to do : change all the ';' into ',' , change all the values for COLUMN2 by using a query, put single quotation marks around some of the values, place a '(' infront of all the lines and a ')' behind them all.
I have had some limited dealings with Java and none having to do with reading and editing text document.
Please tell me if this can be done more easily in some other enviroment than Java, I only mentioned it because I have used it a little. I'm open to anything, I just wan't to avoid editing this file manually.
Thanks for your help.