Sergey/Cetin
The following MB SQL does manage to get the data I want, in the correct order. Problem is it still gets all gen's for those routes that have more than one. I just can't figure out how to get rid of the "older" gens.
Select Rte_No, MAX( ASC( Rte_Let)) "maxGen", Directn, Stop, SeqNo, Time, RunOrder
from RZStop
where Zone = 1
into csrZonesServices NoSelect
group by rte_no, maxGen, stop
order by Rte_No, Stop, maxGen, Directn, SeqNo
I have to ASC() the gen in order to MAX() itr as MAX() only works on numerical fields in MB.
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.