[thelist] SQL query help

Tarrant Costelloe taz at insur-e.net
Fri Nov 8 05:30:01 CST 2002

Hello, I have a table in a database which holds a DATE value like so,
2002-11-08. I have been trying to write an SQL statement that will pull out
a row based on a column named hits,where the row holding the most 'hits' for
the current month is selected. The 'hits' column holds an INTEGER.

So something like this I guess? SELECT * from TABLENAME where DATE = month

My problem occurs is the that date value is of a day, so I need to know how
I can commpare it to the current month.

Kind Regards


More information about the thelist mailing list