Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: difference between records


Message #1 by "Hendrik Klaver" <hendrik_klaver@h...> on Fri, 21 Mar 2003 09:16:04
Hello everybody,

Every week I want to import the actual results over the current year.
For example June 2002 25 Result: 4500. I do this with an importprocedure
and then with a query I generate the result of 4500. I also place the
period in the table with that query.

But I like to know the difference between te periode before and the
newest period. Because I want to see the growth. 

Period             Result  Growth
June 2002 25       4500 
June 2002 26       4675    175
July 2002 27       4850    175
July 2002 28       5050    200
July 2002 29       5225    175
July 2002 30       5550    325
August 2002 31     5625     75
August 2002 32     5811    186
August 2002 33     5994    183
August 2002 34     6214    220
September 2002 35  6375    161
September 2002 36  6565    190
................

Is it possible to make a query which calculates the growth?

hendrik 
Message #2 by gburke4@b... on Sat, 22 Mar 2003 00:44:20
Hi there,

2 ways to do this.

1st is by using VB - however, I see you wish to use a query, so
2nd - copy the data into a second table, changing the date by one day (or 
having a second field called "newdte" which is the original date+1 day.  
Then link these two tables on the date field (or newdte), and calculate 
the difference.

ie
table1         table 2
Jun 26 4675    Jun 26 4500  Diff = 175 (growth)
Jun 27 4850    Jun 27 4675  Diff = 175 (growth)

Regards

> Hello everybody,
 
> Every week I want to import the actual results over the current year.
F> or example June 2002 25 Result: 4500. I do this with an importprocedure
a> nd then with a query I generate the result of 4500. I also place the
p> eriod in the table with that query.

> But I like to know the difference between te periode before and the
n> ewest period. Because I want to see the growth. 

> Period             Result  Growth
J> une 2002 25       4500 
J> une 2002 26       4675    175
J> uly 2002 27       4850    175
J> uly 2002 28       5050    200
J> uly 2002 29       5225    175
J> uly 2002 30       5550    325
A> ugust 2002 31     5625     75
A> ugust 2002 32     5811    186
A> ugust 2002 33     5994    183
A> ugust 2002 34     6214    220
S> eptember 2002 35  6375    161
S> eptember 2002 36  6565    190
.> ...............

> Is it possible to make a query which calculates the growth?

> hendrik 

  Return to Index