S
Stephen Cannell
I would massively appreciate advice on the following
I have data in a large (over 80,000 records) Access table like this:
stkcode price start-date
10601747 1.49 01/05/2006
10601747 0.37 13/01/2006
10601747 0.74 23/12/2005
10601747 1.49 27/10/2005
10601815 1.49 01/05/2006
10601815 0.37 13/01/2006
10601815 0.74 23/12/2005
10601815 1.49 27/10/2005
10601983 0.99 01/05/2006
10601983 0.25 13/01/2006
10601983 0.49 23/12/2005
10601983 0.99 27/10/2005
10602041 1.49 01/05/2006
10602041 0.37 13/01/2006
10602041 0.74 23/12/2005
10602041 1.49 27/10/2005
10602287 1.49 01/05/2006
10602287 0.37 13/01/2006
10602287 0.74 23/12/2005
10602287 1.49 27/10/2005
etc
It shows historic prices of Stock Items.
I need to reformat this into a spreadsheet so that stkcode appears only
once for each item, and with each price lined up next to it in a
separate field, like this:
10601747 1.49 0.37 0.74 1.49
10601815 1.49 0.37 0.74 1.49
etc
It a kind of reversed normalization I think.
The start-date field is not necessary on the export, it is there to
sort the data into descending date order so that the latest price comes
first in the list.
My problem is how to write a query to export from. There are a variable
number of price for each stkcode so some could have, say, ten prices
next to them and others only one.
I am pulling my hair out.
This is needed so I can have an extra three fields on a separate report
showing the three previous prices for each item.
I have even tried using a report grouped on stkcode set to multi-column
so that all the price field appear in their own columns. This actually
works on the screen and printed report itself but when I export the
report to Excel it loses the columns (I know that exporting reports is
flakey at the best of times).
Thanks you in advance for any help.
I have data in a large (over 80,000 records) Access table like this:
stkcode price start-date
10601747 1.49 01/05/2006
10601747 0.37 13/01/2006
10601747 0.74 23/12/2005
10601747 1.49 27/10/2005
10601815 1.49 01/05/2006
10601815 0.37 13/01/2006
10601815 0.74 23/12/2005
10601815 1.49 27/10/2005
10601983 0.99 01/05/2006
10601983 0.25 13/01/2006
10601983 0.49 23/12/2005
10601983 0.99 27/10/2005
10602041 1.49 01/05/2006
10602041 0.37 13/01/2006
10602041 0.74 23/12/2005
10602041 1.49 27/10/2005
10602287 1.49 01/05/2006
10602287 0.37 13/01/2006
10602287 0.74 23/12/2005
10602287 1.49 27/10/2005
etc
It shows historic prices of Stock Items.
I need to reformat this into a spreadsheet so that stkcode appears only
once for each item, and with each price lined up next to it in a
separate field, like this:
10601747 1.49 0.37 0.74 1.49
10601815 1.49 0.37 0.74 1.49
etc
It a kind of reversed normalization I think.
The start-date field is not necessary on the export, it is there to
sort the data into descending date order so that the latest price comes
first in the list.
My problem is how to write a query to export from. There are a variable
number of price for each stkcode so some could have, say, ten prices
next to them and others only one.
I am pulling my hair out.
This is needed so I can have an extra three fields on a separate report
showing the three previous prices for each item.
I have even tried using a report grouped on stkcode set to multi-column
so that all the price field appear in their own columns. This actually
works on the screen and printed report itself but when I export the
report to Excel it loses the columns (I know that exporting reports is
flakey at the best of times).
Thanks you in advance for any help.