Hi All,
I'm trying to export a csv file data to a DB2 table using JDBC connectivity from a java program.
Please find below the code I have used.
String stQuery = "IMPORT FROM \'" + csvFilePath + "\' of del insert into " + DB2_Table_Name ;
CallableStateme nt kk = con.prepareCall ("CALL SYSPROC.ADMIN_C MD(?)");
kk.setString(1, stQuery);
System.out.prin tln(stQuery);
kk.executeQuery ();
Hence it is getting executed through the SYSPROC.ADMIN_C MD stored procedure. It looks for the csvFilepath in the DB2 Server machine.
But I will have the csavfile in my local machine only and this file has to be exported to a DB2 table.
How to resolve this. Please help to overcome from this.
Thanks,
Nagarajan,
I'm trying to export a csv file data to a DB2 table using JDBC connectivity from a java program.
Please find below the code I have used.
String stQuery = "IMPORT FROM \'" + csvFilePath + "\' of del insert into " + DB2_Table_Name ;
CallableStateme nt kk = con.prepareCall ("CALL SYSPROC.ADMIN_C MD(?)");
kk.setString(1, stQuery);
System.out.prin tln(stQuery);
kk.executeQuery ();
Hence it is getting executed through the SYSPROC.ADMIN_C MD stored procedure. It looks for the csvFilepath in the DB2 Server machine.
But I will have the csavfile in my local machine only and this file has to be exported to a DB2 table.
How to resolve this. Please help to overcome from this.
Thanks,
Nagarajan,