bojiokia
04-13-2007, 04:03 AM
This is the SQL statment to generate by calender year type... which mean
from the january to December...
String sql = "SELECT TO_CHAR(REQUEST_DATE, 'MM') AS MONTH, SUM(REQUEST_TYPE)
AS HITS " +
"FROM REQUEST " +
"WHERE BRANCH=? AND CATEGORY=? " +
"AND TO_CHAR(REQUEST_DATE, 'YYYY')=? " +
"GROUP BY TO_CHAR(REQUEST_DATE, 'MM')";
I need the SQL statment to generate by fiscal year type...
Which is from the 1 April 06 to 31 March 07
just like when i choose 1st April 07, it will show me 1 April 07 to 31 March 08
Any one could help? its giving me a headache.
*cheers*
from the january to December...
String sql = "SELECT TO_CHAR(REQUEST_DATE, 'MM') AS MONTH, SUM(REQUEST_TYPE)
AS HITS " +
"FROM REQUEST " +
"WHERE BRANCH=? AND CATEGORY=? " +
"AND TO_CHAR(REQUEST_DATE, 'YYYY')=? " +
"GROUP BY TO_CHAR(REQUEST_DATE, 'MM')";
I need the SQL statment to generate by fiscal year type...
Which is from the 1 April 06 to 31 March 07
just like when i choose 1st April 07, it will show me 1 April 07 to 31 March 08
Any one could help? its giving me a headache.
*cheers*