Calculate Price Change

darreno

Registered User.
Local time
Today, 01:53
Joined
Jun 16, 2007
Messages
54
I have a stock price database with the following fields:
Code Date Close
WAG 5/16/2008 $36.55
WAG 5/19/2008 $36.48
WAG 5/20/2008 $36.18
WAG 5/21/2008 $36.19
WAG 5/22/2008 $35.39
WB 5/16/2008 $27.65
WB 5/19/2008 $27.40
WB 5/20/2008 $27.20
WB 5/21/2008 $26.73
WB 5/22/2008 $25.49
WMT 5/16/2008 $57.39
WMT 5/19/2008 $56.85
WMT 5/20/2008 $56.15
WMT 5/21/2008 $55.94
WMT 5/22/2008 $55.20

…and would like to have a column that shows the price change of the day compared to the previous day and I'm having trouble doing it. Appreciate any help.
 
Thank you!
 
No problem; I'm still working on that site, and hoping to improve it. Did it work okay for you?
 
The code works fine but it runs real slow. Could you please take look at the attached sample db and advise how I can speed it up? I deleted a lot of records to go under the attachment limit. Thanks!
 

Attachments

This works great for what I want; however, when I try to create a report on this query, I get an error message that says "Multi-level GROUP BY clause is not allowed in a subquery." Please help. thanks.
 

Users who are viewing this thread

Back
Top Bottom