Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I need to put something - if it's there or not
Message
From
29/08/2006 11:54:09
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01147940
Message ID:
01149424
Views:
12
I was getting duplicate hits of operator/route combinations.

>What exactly is wrong with result of the query?
>
>>
>>No, that didn't work. I seem to have cracked it with:
>>
>>...
>>  LEFT JOIN RF1 ;
>>    On	NET.Operator  == RF1.Operator ;
>>    and (    NET.Route == RF1.ERoute ;
>>      	 or EMPTY( RF1.ERoute) ) ;
>>...
>>
>>
>>>>Sorry Sergey, I don't understand. I'm not intending to do "strange experiments". Your reply is very vague. I told you originally had that clause in, and got wrong results, and this was before I was advised to LEFT JOIN.
>>>>
>>>>Is there a solution to this or is the whole thread too hard to understand?
>>>Try
>>>
>>>SELECT DISTINCT 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, NET.Family, ;
>>>	0000000 AS CurrPass, 0000000 AS PrevPass, op.Desc as OpDesc, ;
>>>	NVL(RF1.ServType, "?") as ServeType ;	
>>>  FROM NotETM NET ;
>>>    JOIN Operator op ;
>>>      On NET.Operator == op.Code ;
>>>    LEFT JOIN RF1 ;
>>>      On  NET.Operator == RF1.Operator ;
>>>      and NET.Route    == RF1.ERoute ;
>>>  WHERE (	 (	m.ldStartCurr BETWEEN NET.Start_date AND NET.End_date) ; ...
>>>
- 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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform