I am trying to export the data into CSV using openCSv framework.Database is Universe Db.CSV generates fine with "$" as separator.But when we tried to load the same csv data into IBM DB2 database it is failing because of incompatible date format(i.e DD-MMM-YYYY).While IBM DB2 doesnt support the mentioned date format.
Code to generate the CSV:
private CSVWriter writer;
writer = new CSVWriter(new OutputStreamWriter(new FileOutputStream(savePath + "\\" + tableName+ ".csv"),"UTF-8"), '$',CSVWriter.NO_QUOTE_CHARACTER);
writer.writeAll(rs, false); //rs is the resultset returned for the select query
We are loading the csv using DB2 load & imp command.
Kindly help me in changing the default date format while generating the csv or any other option to do the same .
Also,let me know if there is any other framework that can be used to load the csv data.
Puprose of the activity :
To load the data from Universe db to IBM DB2 database.
Note : Universe DB doesnt support updating the resultset hence that option was not taken into consideration