Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL changed its mind again
Message
From
29/07/2006 10:43:28
 
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxExpress
Miscellaneous
Thread ID:
01141384
Message ID:
01141506
Views:
14
SELECT NET.Operator, NET.Route, NET.Start_Date, NET.End_Date, NET.RorF, NET.Passengers, ;
  IIF( NET.Route == NET.Mcl_Rte, "    ", NET.Mcl_Rte) as ContrNum, ;
  0000000 AS CurrPass, 0000000 AS PrevPass, op.Desc as OpDesc, RF1.ServType ;	
  FROM NotETM NET ;
    JOIN Operator op ;
      On NET.Operator == op.Code ;
    JOIN RF1 ;
      On  NET.Operator == RF1.Operator ;
      and NET.Route    == RF1.ERoute ;
    WHERE NET.Operator == m.lnOpCode ; && this should help rushmore - make it clear in your code as well!
        AND ( ;
        ( m.ldStartCurr BETWEEN NET.Start_date AND NET.End_date) ;
  	OR ( m.ldEndCurr   BETWEEN NET.Start_date AND NET.End_date) ;
  	OR ( NET.Start_date < m.ldStartCurr AND NET.End_date > m.ldEndCurr) ;
  	OR ( NET.Start_date => m.ldStartCurr AND NET.End_date <= m.ldEndCurr) ; 		
  	OR ( m.ldStartPrev BETWEEN NET.Start_date AND NET.End_date) ;
  	OR ( m.ldEndPrev   BETWEEN NET.Start_date AND NET.End_date) ;
  	OR ( NET.Start_date < m.ldStartPrev AND NET.End_date > m.ldEndPrev)) ;
  	OR ( NET.Start_date => m.ldStartPrev AND NET.End_date <= m.ldEndPrev) ;
        ) ; && missing some brackets anyone ?
  ORDER BY    NET.Operator, NET.Route ;
INTO CURSOR csrNotETMPassengers NOFILTER READWRITE
Previous
Reply
Map
View

Click here to load this message in the networking platform