MySQL Forums
Forum List  »  Newbie

Re: SUM IF totals help
Posted by: Andrew Adcock
Date: February 04, 2010 06:53PM

laptop alias Wrote:
------------------------------------------------------
> normalized schema. In this
> case that would probably mean a separate table
> with a row for each
> budget_goal_id/select_year/select_month combo.
> E.g.:
> 5, 2010, 01
> 5, 2010, 02
> 5, 2010, 03
> 5, 2010, 04
> 5, 2010, 05

I am sorry for my ignorance laptop alias, but I am not understanding how this table would look.

First, is it a lookup table? Or merely a container to hold values. I assumed that it was the latter but then I could not figure out what my fields would be? maybe one primary key like 'months_id' which is an auto increment (but maybe this field would be overkill?) and then a field for the budget_goal_id which is the foreign key - then once last field that is the concatenation of the year and the month (I suppose I could save this in a DATE field and just always make the day 01?)
Does that sound right??

Options: ReplyQuote


Subject
Written By
Posted
February 03, 2010 10:24AM
February 03, 2010 02:31PM
February 03, 2010 03:19PM
February 03, 2010 07:57PM
February 04, 2010 04:10AM
February 04, 2010 06:12AM
February 04, 2010 07:57AM
February 04, 2010 08:35AM
February 04, 2010 09:12AM
February 04, 2010 10:02AM
February 04, 2010 10:19AM
February 04, 2010 10:26AM
February 04, 2010 11:06AM
February 04, 2010 12:52PM
February 04, 2010 07:12PM
Re: SUM IF totals help
February 04, 2010 06:53PM
February 04, 2010 02:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.