Advertisement

03.19.2008 at 10:32PM PDT, ID: 23256040
[x]
Attachment Details

Adding columns together from seperate rows

Asked by YvesBouele in SQL Server 2005, Microsoft Access Database, SQL Query Syntax

Tags: MS Access, VBA, SQL Store Procedure

I have a table of 4 fields in chronological order.  The rate, the cost, the net and the date.  I would like to write a code or store procedure that would allow to update the NetCost field as illustrated below.
NetCost = Previous NetCost + (Rate * PreviousNetCost)

Date            Rate           Cost             NetCost            
1/1/2008     -0.20          -100              36
1/2/2008     -0.50          -18                18
1/3/2008     -0.20          - 3.6              14.4

Start Free Trial
 
Loading Advertisement...
 
[+][-]03.19.2008 at 11:06PM PDT, ID: 21168674

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 02:09AM PDT, ID: 21169329

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 02:52PM PDT, ID: 21176236

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.20.2008 at 11:28PM PDT, ID: 21178468

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: SQL Server 2005, Microsoft Access Database, SQL Query Syntax
Tags: MS Access, VBA, SQL Store Procedure
Sign Up Now!
Solution Provided By: BriCrowe
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.25.2008 at 12:08PM PDT, ID: 21205025

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628