ranking record with group

P

PF

Hi,

i am using access and i want to rank records by group

i have a product table tblProd with a field produit and associate data
a,...
b,...
b,...
c,...
c,...
c,...

and i want

a,1
b,1
b,2
c,1
c,2
c,3
Where the count is reset each time the product change

if i use
SELECT tblProd.PRODUIT, (select count (*) from tblProd t1 where t1.produit<
t.produit or (t1.produit = t.produit)) AS nb
FROM tblProd

This is not working. Acess dont recognize T1.
I supopose that it works in sql server or other.

Any advise?
regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top