Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL changed its mind again
Message
De
29/07/2006 08:48:48
 
 
À
29/07/2006 08:44:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxExpress
Divers
Thread ID:
01141384
Message ID:
01141476
Vues:
15
Danke Thomas

I'll look into that if I get no joy down my current avenue of inquiry

Terry

(so good to know I'm not the only one working this fine day) :-)

>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?
>
>not clear while it should be misbehaving, but I'ld lean more to:
>
>
>*-- set enginebehaviour 80/90 <g>
>SELECT ;
>  ET.Mcl_Rte, ET.Operator, ET.Route, ET.Class ;
>  , Max(ET.Date) as et_date, Max(ET.RorF) as et_RorF ;
>  , Max(op.Desc) as OpDesc ;
>  , Max(RF1.ServType) as ServType ;
>  , IIF( ET.Route == ET.Mcl_Rte, "    ", ET.Mcl_Rte) as ContrNum ;
>  , SUM( IIF( BETWEEN( ET.date, m.ldStartCurr, m.ldEndCurr), ET.Number, 0000000)) AS CurrPass ;
>  , SUM( IIF( BETWEEN( ET.date, m.ldStartPrev, m.ldEndPrev), ET.Number, 0000000)) AS PrevPass ;
>  FROM ETMData ET ;
>    JOIN Operator op ;
>	On  op.Code == ET.Operator ;
>    JOIN RF1 ;
>	On     RF1.Operator  == ET.Operator  ;
>	  and  RF1.ERoute    == ET.Route  ;
>  WHERE ET.Operator  == m.lnOpCode ;
>    And (    ET.date BETWEEN m.ldStartCurr and m.ldEndCurr ;
>  	  OR ET.date BETWEEN m.ldStartPrev and m.ldEndPrev) ;
>  GROUP BY ET.Mcl_Rte, ET.Operator, ET.Route, ET.Class ;
>  ORDER BY ET.Operator, ET.Route, ET.Class ;
>  INTO CURSOR csrETMPassengers NOFILTER
>
>since this should be equivalent (==) and filters the first table looked at.
>
>my 0.02 EUR
>
>thomas
- 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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform