A
abhi
I am facing a problem using the joinable interface's setMatchColumn
method for specifying multiple columns for the join operation. It is
simply taking the first column and performing the join operation.
For e.g.
ResultSet rs = stmt.executeQuery("select a,b,c from a1");
CachedRowSet a1 = new CachedRowSetImpl();
a1.populate(rs);
String[] arr = {"a","b"};
a1.setMatchColumn(arr);
JoinRowSet jrs = new JoinRowSetImpl();
jrs.addRowSet(a1);
ResultSet rs1 = stmt.executeQuery("select a,b,d from a2");
CachedRowSet a2 = new CachedRowSetImpl();
a2.populate(rs1);
a2.setMatchColumn(arr);
jrs.addRowSet(a2);
The above code just does a join on column "a" without considering
column "b"... plz plz help...
method for specifying multiple columns for the join operation. It is
simply taking the first column and performing the join operation.
For e.g.
ResultSet rs = stmt.executeQuery("select a,b,c from a1");
CachedRowSet a1 = new CachedRowSetImpl();
a1.populate(rs);
String[] arr = {"a","b"};
a1.setMatchColumn(arr);
JoinRowSet jrs = new JoinRowSetImpl();
jrs.addRowSet(a1);
ResultSet rs1 = stmt.executeQuery("select a,b,d from a2");
CachedRowSet a2 = new CachedRowSetImpl();
a2.populate(rs1);
a2.setMatchColumn(arr);
jrs.addRowSet(a2);
The above code just does a join on column "a" without considering
column "b"... plz plz help...