Hello!
We have a process in place which tracks certain "hits" through an ODBC connection - right now, the entire code (which returns what i want) looks like this:
SELECT A.incdnt_rec_typ AS CATEGORY, COUNT (DISTINCT A.INCDNT_ID) AS QTY, B.DIV_NM_EN AS DIVISION_NAME, c.sts_desc_en AS STATUS
FROM PQ5.INCDNT_ALL A, PQ5.DIV B, pq5.sts_all c
WHERE
A.DIV_ID = B.DIV_ID
AND a.sts_cd = c.sts_cd
AND A.incdnt_rec_typ = 'CAR'
AND date(creat_tmstmp) < '2009-07-01'
GROUP BY A.incdnt_rec_typ, B.DIV_NM_EN, c.sts_desc_en;
I want to modify the the code so, simply, instead of having to adjust the "month" every different time i run it (on a monthly basis - i.e.// in august, i'd have to change it to "2009-08-01", it only includes things from the last day of each month, and before - makes sense?
Any help is appreciated.
Andrew.