Hi There,
I'm trying to work out the dwell between stages in our process.
We have a table (Workability) which records progress of parts through the
factory as follows:
PartID Stage Date
X1 1 01/01/05
X1 2 03/01/05
X1 3 10/01/05
X1 4 30/01/05
X2 1 12/02/05
Y1 1 14/03/05
etc
I would like to work out the dwell times inbetween each stage as a
cumulative and stage by stage figure, based on the PartID and working from
the first Date forwards
An example follows:
PartID Stage Date Dwell CDwell
X1 1 01/01/05 0 0
X1 2 03/01/05 2 2
X1 3 10/01/05 7 9
X1 4 30/01/05 20 29
X2 1 12/02/05 1 1
Y1 1 14/03/05 1 1
etc
I believe the best way to do this would be to use some sort of an embedded
query but I can't seem to addapt any of the ones I have.
If anyone can provide the SQL for this problem or point me in a direction
for help I would greatly appreciative,
Thanks,
John Ortt