| | |
Trying to pull and display records from today back 30 days....
Please support our Oracle advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2007
Posts: 66
Reputation:
Solved Threads: 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
any suggestions would be greatly appreciated
java Syntax (Toggle Plain Text)
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
•
•
Join Date: Aug 2007
Posts: 66
Reputation:
Solved Threads: 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')";
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')";
![]() |
Similar Threads
- displaying next 3 rows of query results (PHP)
- svchost.exe takes 100% of cpu (Windows NT / 2000 / XP)
- ALL GMail invites to be posted here please! (Geeks' Lounge)
- can anyone of u help me for this program (C++)
- Back button brings "cannot display ... " certain sites (Windows NT / 2000 / XP)
- Inspiron 1150 wont start up (Troubleshooting Dead Machines)
- Earn $30 per sale!! (Post your Resume)
- Do while Loop to display a choosen month and the dates in it (ASP)
- Cannot use download accelerator on network (Networking Hardware Configuration)
- Display Problems (Windows 95 / 98 / Me)
Other Threads in the Oracle Forum
| Thread Tools | Search this Thread |
Tag cloud for Oracle
2009predictions acquisition amazon.com bartz bernanke cia citrix cloudcomputing crm database dell economy editor enterprise enterprise2.0 enterprisesoftware erp federalreserve forbes hp ibm intellipedia internet larryellison layoffs linux loughridge mediawiki michaeljackson microsoft neverland nortel notebooks oil operatingsystem oracle palm rimm saas salesforce sap seagate socialcomputing sql sun sybase technologystocks virtualiron virtualization vmware wiki wikipedia xen yahoo zoho






