http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.admin.d
oc/doc/r0000814.htm
INTEGER(Searched.Search_date) / 100
Cheers
Serge

Signature
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
<SNIP>
>Got it and it works perfectly, Thanks! ( I used a join myself )
You're most welcome. Glad i could be of service.
>However, the problem I have is that it is calculating the month of
>january as a total of every january ever entered in the database!!! I
[quoted text clipped - 6 lines]
>I tried CAST(Searches.Search_Date AS DATE FORMAT 'mm/yy') however it
>failed at "FORMAT"
The problem is that month is not divided into years. The solution is
to GROUP BY years as well.
GROUP BY
YEAR(Searches.Search_Date),
MONTH(Searches.Search_Date)
That will first section off all data by years, and then--within each
yearly group--it will further section them by month.
>Also, the months are in the order Jan - Dec. I am using this for a
>graph and want the last month to be this month (May-07) and them going
>back historically for a predefined period.
Can't you use:
ORDER BY
YEAR(Searches.Search_Date) DESC,
MONTH(Searches.Search_Date) DESC
>I can't seem to find much help on DATE functions on the web - maybe
>I'm not searching right!
Optimally, you should be reviewing all FUNCTIONs availble in the DB2
documentation. It's a good list to be familiar with.
B.