>No, it can't be. What OpeCode you enter, just to test this?
Op Code 1 - ASD Transport
>BTW did you like Excel picture I sent to you?
Wow! I've just looked since you sent this message. I've been so concentrating on this problem. It looks great!
I hear another reply (maybe from you) so get back to you .
>
>
>>Hey Boris
>>
>>That was a breakthrough. I still get other operators, but at least the report STARTS with the selected op. I wonder if it's the NOTETM data that follows that's screwing it. But I DID apply similar to all the SQLs.
>>
>>Terry
>>
>>>>The following code was happily and successfully selecting data for just the chosen operator, now its gone back to selecting all operators (or damn near all). I don't know what I've done to make it change its mind.
>>>>
>>>>Any ideas?
>>>>
>>>>
>>>>SELECT ET.Operator, ET.Route, ET.Class, ET.Date, ET.RorF, op.Desc as OpDesc, RF1.ServType, ;
>>>> IIF( ET.Route == ET.Mcl_Rte, " ", ET.Mcl_Rte) as ContrNum, ;
>>>> SUM( IIF( BETWEEN( ET.date, ldStartCurr, ldEndCurr), ET.Number, 0000000)) AS CurrPass, ;
>>>> SUM( IIF( BETWEEN( ET.date, ldStartPrev, ldEndPrev), ET.Number, 0000000)) AS PrevPass ;
>>>> FROM ETMData ET ;
>>>> JOIN Operator op ;
>>>> On ET.Operator == op.Code ;
>>>> JOIN RF1 ;
>>>> On ET.Operator == RF1.Operator ;
>>>> and ET.Route == RF1.ERoute ;
>>>> WHERE op.Code == lnOpCode ;
>>>> And ( ET.date BETWEEN ldStartCurr and ldEndCurr ;
>>>> OR ET.date BETWEEN ldStartPrev and ldEndPrev) ;
>>>> GROUP BY ET.Mcl_Rte, ET.Operator, ET.Route, ET.Class ;
>>>> ORDER BY ET.Operator, ET.Route, ET.Class ;
>>>> INTO CURSOR csrETMPassengers NOFILTER
>>>>
>>>>
>>>
>>>Terry,
>>>what happoens if you change:
>>> WHERE op.Code == lnOpCode ;
>>>
>>>To
>>> WHERE ET.Operator == lnOpCode ;
- 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.