Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pre-filtering and inner joins
Message
De
27/03/2003 13:05:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00770813
Message ID:
00770861
Vues:
15
>>>I'm trying to get a filtered set of jobs with the customer's company and the job's address. The user can filter on various tables, so I decided to run the filters on each table individually to avoid having such huge temp cursors.
>>Michelle,
>>Try :
>> LEFT JOIN tc_city ON jobs.jobno = tc_city.jobno
>>Cetin
>
>That will get me all jobs whether there is a matching city or not, so that won't work. But that gives me an idea...
>
>Possibly:
>
>LEFT JOIN tc_city ON (jobs.jobno = tc_city.jobno)
>...
>WHERE (NOT ISNULL(tc_city.jobno)) OR (lcCityFilt = ".T.")
>
>That _might_ work.
>
>I'll go try it. :)
>
>Thanks,
>
>Michelle

I didn't look closely your city filter :)

tcCity = iif(!empty(tcCity),'city = '+tcCity, 'city = ""')

Would work (unless ANSI is on)?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform