I just want my record day wise, with sum of rate , tax & amount but differentiate it acc to tax, i.e.5% tax entries of a day sum up & in different row & 13% tax entries with sum will be a diff. row.
try {
Connection con=Conn.getConnection();
Statement ps=con.createStatement();
ResultSet rs=ps.executeQuery("Select Store, InvoiceDate, sum(Rate*quantity), Percen, sum(Tax*Quantity), sum(Amount) from Orders Group By InvoiceDate, Store, Percen");
while(rs.next()){
v=new Vector();
v.add(rs.getString(1));
v.add(converToString(rs.getDate(2)));
v.add(rs.getDouble(3));
v.add(rs.getString(4));
v.add(rs.getDouble(5));
v.add(rs.getDouble(6));
mDateWise.addRow(v);
}
con.close();
}
catch (Exception ex) {
JOptionPane.showMessageDialog(c,ex.toString());
}
It's showing error java.sql.SQLException: No data found . help!!