[AccessD] Normalize Data by date

Rocky Smolin - Beach Access Software bchacc at san.rr.com
Thu Mar 2 11:45:21 CST 2006


Chester:

Now that I see what's what I think this is best done in code in a big 
loop. 

I'd set up an array to hold the sums.  Set the number of rows in the 
array to the maximum number of data points any well has and the number 
of columns to 2 - the first column holding the sum of the water volume, 
the second holding the sum of the CO2.

Open up a DAO recordset for each well in turn.  Initialize a counter to 
1. Put the first data points into the first cell.

Add one to the counter and using .MoveNext until .EOF add the data in 
each record to the appropriate cells pointed to by the counter.

If this ain't perfect at least it might give you an idea of an approach.

HTH

Rocky


Kaup, Chester wrote:
> All of the wells may have a different number of data points. For example
> if well 1 has been on for 1 year it will have 12 data points. If well 2
> has been on for 6 months it will have 6 data points. However many wells
> have data at a certain number of data points from the first data point
> get added together. Thus if 6 wells has data at the first point they are
> summed. If there are three wells that have data at the second point
> those three are added together. If only 2 wells have data at the last
> point only there data is summed. Thanks.
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky Smolin
> - Beach Access Software
> Sent: Thursday, March 02, 2006 11:03 AM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] Normalize Data by date
>
> Do each of the wells have the same number of dates?  If not, what do you
>
> do when you get to the third date for well 1 and well2 doesn't have a 
> third date?
>
> Rocky
>
>
> Kaup, Chester wrote:
>   
>> Example data
>> Well_Number		Production_Date		Water_Volume
>> CO2_Volume
>> 1			1/1/2005			10
>> 10
>> 1			2/1/2005			20
>> 15
>> 1			3/1/2005			25
>> 20
>> 2			4/1/2005			50
>> 35
>> 2			5/1/2005			75
>> 100
>> 2			6/1/2005			44
>> 87
>> 3			10/1/2005			100
>> 20
>> 3			11/1/2005			200
>> 40
>> 4			2/1/2006			123
>> 57
>> 4			3/1/2006			44
>> 23
>>
>> To normalize the data what I need to do is sum the Water_Volumes and
>> CO2_Volumes for the first date for each well, second date etc. Thus
>>     
> for
>   
>> dimensionless date 1 well 1 on 1/1/2005 is added to well 2 on 4/1/2005
>> is added to well 3 on 10/1/2005 and is added to well 4 on 2/1/2006.
>>     
> For
>   
>> Water_Volume on first date 10+50+100+123. For CO2_Volume on first date
>> 10+35+20+57. The again for the second date for sum wells etc. Hope
>>     
> this
>   
>> makes sense. Thanks.
>>
>> -----Original Message-----
>> From: accessd-bounces at databaseadvisors.com
>> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Rocky
>>     
> Smolin
>   
>> - Beach Access Software
>> Sent: Thursday, March 02, 2006 10:17 AM
>> To: Access Developers discussion and problem solving
>> Subject: Re: [AccessD] Normalize Data by date
>>
>> Chester:
>>
>> Sorry for the late reply.  What exactly do you mean by "normalize back
>>     
>
>   
>> to the first volume date"?  Can you give an example?
>>
>> Regards,
>>
>> Rocky Smolin
>> Beach Access Software
>> 858-259-4334
>> www.e-z-mrp.com
>>
>>
>> Kaup, Chester wrote:
>>   
>>     
>>> I have a table with 4 columns of data. The fields are  Well_Number,
>>> Production_Date, Water_Volume and CO2_Volume. I need to normalize
>>>     
>>>       
>> these
>>   
>>     
>>> back to the first volume date separately for Water_Volume and
>>> CO2_Volume. ie sum the first volumes data together regardless of date
>>> and through the rest of the records. Hope I am making sense. I am at
>>>       
> a
>   
>>> loss of where to start. Thanks.
>>>
>>>  
>>>
>>> Chester Kaup
>>>
>>> Engineering Technician
>>>
>>> Kinder Morgan CO2 Company, LLP
>>>
>>> Office (432) 688-3797
>>>
>>> FAX (432) 688-3799
>>>
>>>  
>>>
>>>  
>>>
>>> No trees were killed in the sending of this message. However a large
>>> number of electrons were terribly inconvenienced.
>>>
>>>  
>>>
>>>   
>>>     
>>>       
>>   
>>     
>
>   

-- 
Rocky Smolin
Beach Access Software
858-259-4334
www.e-z-mrp.com




More information about the AccessD mailing list