I'm new to mysql and want to retrieve all rows from my dbase where my table column "registry_date" is the same month as variable "var_month".
I tried using DATEPART function, but I received syntax errors. My sql statement was:
SELECT * FROM corporate_table WHERE DATEPART(mm, registry_date)=var_month
Came someone point me in the right direction? Much thanks,
Mike