Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Problem with LEFT JOIN
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Divers
Thread ID:
00978845
Message ID:
00979710
Vues:
9
>>This is my best/worst view, depending on how you look at it. All it does is create a list of records that meet six fully optional specified conditions. The last two options pull records from other views (or not).
>>
>>SELECT Enroll.enrollid;
>> FROM ;
>>     smagic!enroll;
>> WHERE ( ( ( ( (  IIF(EMPTY(?vp_scheduleid),.T.,Enroll.scheduleid=(?vp_scheduleid)) ;
>>   AND  IIF(EMPTY(?vp_programid),.T.,Enroll.programid=(?vp_programid))  );
>>   AND  IIF(EMPTY(?vp_startdateid),.T.,Enroll.startdateid=(?vp_startdateid))  );
>>   AND  IIF(EMPTY(?vp_enddateid),.T.,Enroll.enddateid=(?vp_enddateid))  );
>>   AND  (  EMPTY(?vp_actionid) ;
>>   OR  Enroll.enrollid IN (SELECT enrollid FROM v_actionflag) ) );
>>   AND  (  EMPTY(?vp_hasflag) ;
>>   OR  Enroll.enrollid IN (SELECT enrollid FROM v_mustflag) ) );
>>   AND  Enroll.enrollid NOT IN (SELECT enrollid FROM v_notflag)
>>
>
>I tried your idea, but it didn't work for me. It returns 0 records and it is slow. I have several records starting with "GREEN". Do you see, what did I do wrongly here?
>
>vp_cClient_Account_Number = ""
>vp_cLast = "Green%"
>vp_cFirstName = ""
>vp_cMiddle = ""
>vp_cSSN = ""
>vp_cAreaCode = ""
>vp_cExchange = ""
>vp_cFour = ""
>vp_cExchange_Four = ""
If I have records starting with "GREEN", no surprise that "Green" would return 0 result. But it took me a while to realise my mistake...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform