At 10:11 PM 3/12/2008, Joseph Drake-Brockman wrote:
I have geophysical data that is measured each 10 cm down a drill hole. I want to apply a three point filter down the hole. That is: for readings at 10, 20, 30, 40, 50 cm etc I want to apply a formula that incorporates the values at 10, 20 & 30 cm for 20 cm; 20, 30 & 40 cm for 30 cm etc. How do you do this. I understand how you would do this in excel or in a vb array but I haven't done anything like this in a database. Is this where a cursor is used.
Joe, Take a look at the (LAVG(list)), an Arithmetic and Mathematical Function of R:BASE. (LAVG(list)) returns the average of the values in list. Values in a list can be a CURRENCY, DOUBLE, REAL, INTEGER, NUMERIC, DATE, or TIME data type. Keep in mind that the function LAVG is not the same as the function AVG, which is used only with the SELECT command. -- Example 01: In the following example, the value of vLAvg is 20. The total of the list is 60, which is divided by 3, the number of values in the list. SET VAR vLAvg = (LAVG(10,20,30)) -- Example 02: In the following example, the value of vLAvg is 30. The total of the list is 90, which is divided by 3, the number of values in the list. SET VAR vLAvg = (LAVG(20,30,40)) Hope that helps! Very Best R:egards, Razzak.

