SELECT trandate, trantype, sum(tranamt) AS tranamt FROM mytran ; WHERE bookyear = ?cAcctyear AND accode = ?nAccode ; GROUP BY Month(trandate), trantypeI want to make this query to be executed on any remote database including VFP. The above executes in VFP without any problem. But in Oracle is not and the reason is I do not know the equivalent function for MONTH() that I have used under my "group by" clause. I guess TO_CHAR(trandate, "MM") should work with Oracle but I do not want to go by that as it will not work with other databases. Please help.