G
Guest
Hi,
I use a DB of Purchase Orders, and I created a query about detailed orders
(single lines, products, amounts, ID Order, etc.).
Now I have as many lines (in the query) as the total lines in the orders,
with the ID order field that sometimes is repeated (since for a single order
there may be many lines).
What I need is a new field in the query that counts how many rows there are
in the query with the same ID Order number, for each single line.
for example:
ID Order Product Count Field
1 aaa 3
1 bbb 3
1 ccc 3
2 xxx 1
I tried with the Count function, but it returned me the total count of
records where ID Order is = ID Order in the query, i.e. the total amount of
lines (62).
I should make a kind of function as in Excel, that search in each single
line the ID Order value, and counts how many records with that value are
included in the query.
Thanks in advance.
Fabio CH
I use a DB of Purchase Orders, and I created a query about detailed orders
(single lines, products, amounts, ID Order, etc.).
Now I have as many lines (in the query) as the total lines in the orders,
with the ID order field that sometimes is repeated (since for a single order
there may be many lines).
What I need is a new field in the query that counts how many rows there are
in the query with the same ID Order number, for each single line.
for example:
ID Order Product Count Field
1 aaa 3
1 bbb 3
1 ccc 3
2 xxx 1
I tried with the Count function, but it returned me the total count of
records where ID Order is = ID Order in the query, i.e. the total amount of
lines (62).
I should make a kind of function as in Excel, that search in each single
line the ID Order value, and counts how many records with that value are
included in the query.
Thanks in advance.
Fabio CH