Page 2 of 2

Posted: Wed Oct 17, 2007 10:31 am
by RobbieL
Both suggestions worked great. Is there a good reason for using one over the other?

For my SQL query to pull all the data by year only, I've looked through the MySQL manual and spotted the YEAR function. It doesn't give an example of it in a query, but am I right in assuming it works similiar to other functions like SUM?

Posted: Wed Oct 17, 2007 10:33 am
by RobertGonzalez
YEAR returns the year part of the date. Try running a query in your favorite query browser to see how it works.

Posted: Wed Oct 17, 2007 11:19 am
by RobbieL
Woot! Got it all working!

Big thanks to you guys! Can't tell you how much I appreciate all your help. Wish I could return the favour, but I think it's going to be a while before I'm at that level.

Big thanks again. :wink:

Posted: Wed Oct 17, 2007 11:32 am
by pickle
No problem. Don't worry about paying it back - pay it forward ;)

Posted: Wed Oct 17, 2007 11:38 am
by RobertGonzalez
And congrats on getting it worked out.