I have are resultset based on this SELECT statement:
"SELECT ca.mem_no, me.mem_surname, me.mem_first_name, " +
"lcc.call_cat, ca.call_location, ca.caller_name, lsc.call_sub_cat, ca.call_id, " +
"call_date_start, ca.call_note_start, ca.call_date_end, ca.call_duration, lcs.call_status, " +
"lca.call_action, lcr.call_res, ca.call_note_res\n" +
"FROM tblCall ca\n" +
"INNER JOIN tlkpCallStatus lcs on lcs.callstatus_id = ca.callstatus_id\n" +
"INNER JOIN tlkpCallAction lca on lca.callaction_id = ca.callaction_id\n" +
"INNER JOIN tlkpCallResolution lcr on lcr.callres_id = ca.callres_id\n" +
"LEFT OUTER JOIN tlkpCallSubCategory lsc on lsc.callsubcat_id = ca.callsubcat_id\n" +
"INNER JOIN tlkpCallCategory lcc on lcc.call_cat_id = ca.call_cat_id\n" +
"LEFT OUTER JOIN tblMember me on me.mem_no = ca.mem_no\n" +
"INNER JOIN tblClient cl on cl.client_ident = me.client_ident\n" +
"WHERE me.client_ident = \'AVA\'" +
"AND ca.call_date_start BETWEEN '2017-02-01' AND '2017-02-28'\n" +
"ORDER BY date(ca.call_date_start);\n"
;
which will rst.next() to a speadsheet ... i realize i can get the count of rows by waiting for the processing to finish, however i need the row count prior to writing the report .. i am faced with writing another pre sql statement getting COUNT(*) based upon the same JOIN and WHERE conditions. But i don't want to have two copies of basically the one sql statement ..
Is there a way (JAVA, Sqlite3) i can "SELECT COUNT(*)" from the existing resultset? ... seems a waste to have to go and get them all again just to be able to count the rows. :)