The extract function

admin

Administrator
Staff member
I am working with a canned script which produces a MySql query (see below) and MySql complains.

SELECT * FROM Stuff WHERE (extract(MONTH from
PostStamp) = \'01\');

The table Stuff has a field labeled PostStamp which is of type datetime.

It seems to me this query is nested so MySql will not like it. (could have been extracted from another DB query??)

Can anyone please give me a clue as how to configure this qurey into a something MySql will accept.

Thanks in advance
 
Back
Top