Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.io.*;
- public class Main {
- public String sqlQueryGenereator(String arr[]){
- String sql = "INSERT INTO `PROJECT`(`PROJECT_ID`, `PROJECT_NAME`, " +
- "`PROJECT_PURPOSE`, `PROJECT_DESC`, `APPROV_STATUS`, `YEAR`, " +
- "`FISCAL_YEAR`, `DIVISION_ID`, `DISTRICT_ID`, `CONSTITUENCY_ID`, " +
- "`SUB_DISTRICT_ID`, `TOTAL_ALLOCATION`, `MINISTRY_ID`, `SECTOR_ID`," +
- " `IMPL_ORG_ID`, `START_DATE`, `END_DATE`, `GOB`) VALUES ("+arr[0]+"," +
- arr[1]+","+arr[2]+","+arr[3]+","+arr[4]+","+arr[5]+","+arr[6]+","+arr[7]+"," +
- arr[8]+","+arr[9]+","+arr[10]+","+arr[11]+","+arr[12]+","+arr[13]+","+arr[14]+"," +
- arr[15]+","+arr[16]+","+arr[17]+")";
- return sql;
- }
- public static void main(String[] args) throws IOException {
- File inputFile = new File("t.txt");
- File outputFile = new File("op.txt");
- BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(inputFile), "UTF8"));
- String str;
- Writer out = null;
- try {
- out = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), "UTF8"));
- } catch (UnsupportedEncodingException | FileNotFoundException e) {
- e.printStackTrace();
- }
- while ((str = in.readLine()) != null) {
- // System.out.println(str);
- // String s = "আমি খাপ";
- if(str.equals("টাইপ - ১ ")){
- System.out.println("yes");
- System.out.println(str);
- }
- else {
- // System.out.println("no");
- int index = str.indexOf("= ") ;
- index += 2;
- String tt = str.substring(index);
- System.out.println(tt);
- }
- // System.out.println(s);
- out.append(str).append("\r\n");
- }
- out.flush();
- in.close();
- // out.append(build).append("\r\n");
- out.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement