0
I am trying to put together a report for supply management. I have a Supply Table with the following fields:
DataAbastecimento,
CódigoVeiculo,
KmAbastecimento,
Quantidade,
Valor
In the Report I’m doing, I need to know the KM Traveled...so follow example:
Veiculo Data Abastecimento KM KM Anterior
999 02/06/2016 10.000 Buscar o Último KM de Abastecimento de Maio
999 08/06/2016 10.800 10.000
999 11/06/2016 11.300 10.800
999 19/06/2016 13.200 11.300
Until the KM column, it is a simple search...but this KM Anterior is hitting me some time.
Someone has come across this?
Put an sql example to take the data you want. So it’s easier to mount one that suits you.
– Ricardo