0

Here's my code...basically, I hard coded yesterday just to make sure it works...Im trying to get it to display results everyday

String sqlStmt = "SELECT distinct count (lc.con_id) as TotalLeads FROM LEADS L inner join leads_contactinfo lc on l.fk_conid = lc.con_id" +
                        " WHERE l.FK_CONID = lc.CON_ID AND lc.FK_AGENTID = ? AND CON_INITDATE > to_date('2007/07/13', 'yyyy/mm/dd') AND CON_INITDATE < to_date('2007/08/14', 'yyyy/mm/dd')";

any suggestions would be greatly appreciated

2
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by mimsc
0

ok...I tried that...im not too savvy with sql....should it look like this?:

String sqlStmt = "SELECT distinct count (lc.con_id) as TotalLeads FROM LEADS L inner join leads_contactinfo lc on l.fk_conid = lc.con_id" +
" WHERE l.FK_CONID = lc.CON_ID AND lc.FK_AGENTID = ? AND CON_INITDATE > to_date('sysdate-30', 'yyyy/mm/dd') AND CON_INITDATE < to_date('sysdate', 'yyyy/mm/dd')";

0

im getting this error now java.sql.SQLException: ORA-01841: (full) year must be between -4713 and +9999, and not be

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.