Hi, I have a Querry that has listed everyone who had returned checks here. So i want a form with just the 10 top people who had the checks returned...
I already did the Querry OK! Just need to know how can I select the "N" first record!
I can't figure it out!
Flavio
ray:
Sql code:
SELECT DISTINCTROW CPF.Nome, Sum(Cheques.Valor) AS Dev, Sum(Cheques.[Valor Pago]) AS Rec, Sum([valor])-Sum([valor pago]) AS ss, Count(CPF.Nome) AS Qtde
FROM CPF INNER JOIN Cheques ON CPF.CPF = Cheques.CPF
GROUP BY CPF.Nome
ORDER BY Sum([valor])-Sum([valor pago]) DESC;
I already did the Querry OK! Just need to know how can I select the "N" first record!
I can't figure it out!
Flavio
ray:
Sql code:
SELECT DISTINCTROW CPF.Nome, Sum(Cheques.Valor) AS Dev, Sum(Cheques.[Valor Pago]) AS Rec, Sum([valor])-Sum([valor pago]) AS ss, Count(CPF.Nome) AS Qtde
FROM CPF INNER JOIN Cheques ON CPF.CPF = Cheques.CPF
GROUP BY CPF.Nome
ORDER BY Sum([valor])-Sum([valor pago]) DESC;