| Author |
Topic  |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 12:09:41
|
I have a Monthlyexpense column. How do I Sum up this column and put the Total in my ytdexpenses column. Do I use a stored procedure, because I want the monthlyExpenses to SUm up every time I submit a monthly expense to the database and siplay in the ytdExpenses Column. When I Write a Query all of the rows in the ytdExpenses shows the same amount and do not total up every time I submit to the database. Help please.
monthlyExpenses ytdExpenses $1,000 $1,000 $2,000 $3,000 $3,000 $6,000 $2,000 $8,000 $5,000 $13,000 khtan Flowing Fount of Yak Knowledge
Singapore 3773 Posts
|
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
USA
6997 Posts |
Posted - 10/16/2006 : 12:24:47
|
If you want a total, you actually have to program it. Just calling it YTD Expenses will not get data into the column.
Also, your table doesn't make much sense to me. If you have a column for monthlyExpenses, how do you know which month it is or who the expsnse is for?
CODO ERGO SUM |
Edited by - Michael Valentine Jones on 10/16/2006 12:25:12 |
 |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 12:28:13
|
| Michael Valentine....the month is for the date it was filled out...it's for that department...I know you have to program it...but with what? |
 |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 12:30:09
|
| Can Anyone help me out...instead of asking questions that I already know. |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
USA
6997 Posts |
Posted - 10/16/2006 : 12:34:57
|
Your table doesn't have the data element month or department, so how do you kwow? Or did you just not provide that information?
CODO ERGO SUM |
 |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 12:40:01
|
| It's only one department and I did not provide that information? What do you mean about data Element? |
 |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 12:42:19
|
| All I want to do is Sum up the monthlyExpenses and update the ytdExpenses everytime I submit data to the database. |
 |
|
|
Michael71
Posting Yak Master
USA
126 Posts |
Posted - 10/16/2006 : 13:08:08
|
CAn anyone help me out Please
|
 |
|
|
SwePeso
Patron Saint of Lost Yaks
Sweden
29138 Posts |
|
| |
Topic  |
|