A
anil
hi all
I am facing the wierd problem of cummulative addition.
the table looks like
[SampleID] [SampleDate] [ParameterTestMethods] [ParameterMethodCost]
[ParameterName] [ParameterTestCost] [ P_CoST]
10172 9/08/2006 MAJOR
$12.00 MAGNESIUM $3.00 $15.00
10172 9/08/2006 MAJOR
$12.00 SODIUM $3.00 $18.00
10172 9/08/2006 MAJOR
$12.00 CALCIUM $3.00 $21.00
10172 9/08/2006 MAJOR
$12.00 SULPHATE_ICPMS $3.00 $24.00
10172 9/08/2006 TRACE_PLUS
$24.00 ZINC_ICPMS $3.20 $27.20
10172 9/08/2006 TRACE_PLUS
$24.00 MANGANESE_ICPMS $3.20 $30.40
10172 9/08/2006 TRACE_PLUS
$24.00 MERCURY_ICPMS $3.20 $33.60
10172 9/08/2006 TRACE_PLUS
$24.00 NICKEL_ICPMS $3.20 $36.80
here the P_Cost is the sum of ParameterMethodCost and
parametertestingcost(12+3).The next parameterName in that same method
is sum of ParameterMethodCost and last 2 parameters(12+3+3).
as the method changes the loop startes again--(24+3.20) -----
(24+3.20+3.20+3.20+ ----)
can someone help me how to do this in query or if we need any function
..
Thanks
anil
I am facing the wierd problem of cummulative addition.
the table looks like
[SampleID] [SampleDate] [ParameterTestMethods] [ParameterMethodCost]
[ParameterName] [ParameterTestCost] [ P_CoST]
10172 9/08/2006 MAJOR
$12.00 MAGNESIUM $3.00 $15.00
10172 9/08/2006 MAJOR
$12.00 SODIUM $3.00 $18.00
10172 9/08/2006 MAJOR
$12.00 CALCIUM $3.00 $21.00
10172 9/08/2006 MAJOR
$12.00 SULPHATE_ICPMS $3.00 $24.00
10172 9/08/2006 TRACE_PLUS
$24.00 ZINC_ICPMS $3.20 $27.20
10172 9/08/2006 TRACE_PLUS
$24.00 MANGANESE_ICPMS $3.20 $30.40
10172 9/08/2006 TRACE_PLUS
$24.00 MERCURY_ICPMS $3.20 $33.60
10172 9/08/2006 TRACE_PLUS
$24.00 NICKEL_ICPMS $3.20 $36.80
here the P_Cost is the sum of ParameterMethodCost and
parametertestingcost(12+3).The next parameterName in that same method
is sum of ParameterMethodCost and last 2 parameters(12+3+3).
as the method changes the loop startes again--(24+3.20) -----
(24+3.20+3.20+3.20+ ----)
can someone help me how to do this in query or if we need any function
..
Thanks
anil