I'm trying to pull the system date for last year and three previous years. To avoid putting parameters in, I'd like to program the dates in automatically. Here's the code I have so far:
WHERE (QO01ACCIDENT_YEAR BETWEEN '2008' AND '2010') AND (QO01SUBMIT_AGENCY_ORI = ? OR QO01MUNICIPALITY = ?)) AS SEVACC
I'd like to select the years from the system as I said earlier to avoid having the user have to input parameters. I found the YEAR(CURRENT DATE) but it's not working for me. Does anyone have any suggestions. Please let me know if you need additional information. Thanks.
Last edited by sathyaram_s; 04-02-11 at 11:33.
Reason: corrected code tag