F
Frank Dulk
in general terms, a query with this
SELECT [CodCartao],max([DataPgto]), [ValorPgto]
FROM TABELA_PAGAMENTOS
WHERE MAX([DataPgto]) < DATEADD["M",-1,[DataPgto])
GROUP BY [CodCartao],[ValorPgto]
should solve your problem.
In consultations, we should have A LOT OF ATTENTION with the use of the
functions First, Last, DFirst, DLAst, because, unless the researched field
is THE PRIMARY KEY, there won't be ANY WARRANTY that the come back result is
in fact the correct information. In fact, rule road, the result can be had
as randon.
Therefore the employment of the function Max () in the example above!
SELECT [CodCartao],max([DataPgto]), [ValorPgto]
FROM TABELA_PAGAMENTOS
WHERE MAX([DataPgto]) < DATEADD["M",-1,[DataPgto])
GROUP BY [CodCartao],[ValorPgto]
should solve your problem.
In consultations, we should have A LOT OF ATTENTION with the use of the
functions First, Last, DFirst, DLAst, because, unless the researched field
is THE PRIMARY KEY, there won't be ANY WARRANTY that the come back result is
in fact the correct information. In fact, rule road, the result can be had
as randon.
Therefore the employment of the function Max () in the example above!