OK I have to find the total income per month over the financial year for a dog kennels business.This is what I thought would work:
SELECT DatePart(m,tblBOOKING.START_DATE), SUM((tblBOOKING.END_DATE-tblBOOKING.START_DATE)*tblCOST.COST_PER_DAY)FROM tblBOOKING, tblCOSTWHERE (((tblBOOKING.START_DATE)>=[input year start]) And ((tblBOOKING.END_DATE)<=[input year end]))GROUP BY DatePart(m,tblBOOKING.START_DATE)ORDER BY DatePart(m,tblBOOKING.START_DATE);
and whilst it saves when I run the query I get the very useful error message stating its either typed wrong or is to complex to be evaluated.Now, I'm seriously new to sql, have only been doing it a few days, so any help would be very appreciated.I'm also having a problem with this code, which is supposed to display a walking a feeding schedule, but its treating tblWALK_FEED. PM_FEED as a parameter.
sql in access
in SQL
Posted
OK I have to find the total income per month over the financial year for a dog kennels business.This is what I thought would work:
and whilst it saves when I run the query I get the very useful error message stating its either typed wrong or is to complex to be evaluated.Now, I'm seriously new to sql, have only been doing it a few days, so any help would be very appreciated.I'm also having a problem with this code, which is supposed to display a walking a feeding schedule, but its treating tblWALK_FEED. PM_FEED as a parameter.
Thanks for any help!