[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Invoice #
[/TD]
[TD]Order #
[/TD]
[TD]Customer #
[/TD]
[TD]Item #
[/TD]
[TD]Item QTY
[/TD]
[/TR]
[TR]
[TD]100001
[/TD]
[TD]1001
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]100335
[/TD]
[TD]1021
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]103009
[/TD]
[TD]1103
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]3
[/TD]
[/TR]
</tbody>[/TABLE]
Very small sample table. But let's say I wanted to add 2 columns to this.
The first one would be labeled: Reorder?
What I'm looking to accomplish with this is to signify that rows 2 and 3 are re-orders of an item first ordered in row 1 (my data has invoice dates ordered oldest to newest, as well as several hundred of rows in between each potential re-order). Anything can go into the field.. Y, 1, True, anything.
The next field would be labeled: Reorder Time
If it's a reorder then I would like it to calculate the time difference between the current row's Invoice date and the invoice date from the last data row order/reorder of that item.
HELP
<tbody>[TR]
[TD]Invoice #
[/TD]
[TD]Order #
[/TD]
[TD]Customer #
[/TD]
[TD]Item #
[/TD]
[TD]Item QTY
[/TD]
[/TR]
[TR]
[TD]100001
[/TD]
[TD]1001
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]2
[/TD]
[/TR]
[TR]
[TD]100335
[/TD]
[TD]1021
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]103009
[/TD]
[TD]1103
[/TD]
[TD]10
[/TD]
[TD]XB33
[/TD]
[TD]3
[/TD]
[/TR]
</tbody>[/TABLE]
Very small sample table. But let's say I wanted to add 2 columns to this.
The first one would be labeled: Reorder?
What I'm looking to accomplish with this is to signify that rows 2 and 3 are re-orders of an item first ordered in row 1 (my data has invoice dates ordered oldest to newest, as well as several hundred of rows in between each potential re-order). Anything can go into the field.. Y, 1, True, anything.
The next field would be labeled: Reorder Time
If it's a reorder then I would like it to calculate the time difference between the current row's Invoice date and the invoice date from the last data row order/reorder of that item.
HELP