G
Guest
Hi
I have a database where I have a number of transactions (numbered from 1 up)
with a number of transaction lines in each. For example, transaction 1 might
have 2 lines of info, transaction 2 may have 5 lines. I have a table with
the transaction lines in and I need to create a query that numbers the lines
of each transaction.
In my example, I might have:
trans item
1 apple
1 orange
2 apple
2 pear
2 peach
2 orange
2 strawberry
What I need to get to is this:
trans line item
1 1 apple
1 2 orange
2 1 apple
2 2 pear
2 3 peach
2 4 orange
2 5 strawberry
So each line in each transaction needs its own line number (within that
transaction). I don't see how to do it with count - or anything else,
actually!
Thanks in advance!
Andy.
I have a database where I have a number of transactions (numbered from 1 up)
with a number of transaction lines in each. For example, transaction 1 might
have 2 lines of info, transaction 2 may have 5 lines. I have a table with
the transaction lines in and I need to create a query that numbers the lines
of each transaction.
In my example, I might have:
trans item
1 apple
1 orange
2 apple
2 pear
2 peach
2 orange
2 strawberry
What I need to get to is this:
trans line item
1 1 apple
1 2 orange
2 1 apple
2 2 pear
2 3 peach
2 4 orange
2 5 strawberry
So each line in each transaction needs its own line number (within that
transaction). I don't see how to do it with count - or anything else,
actually!
Thanks in advance!
Andy.