Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT ... JOIN Syntax
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00126277
Message ID:
00126468
Vues:
17
>This would be more kosher;
>
>
>SELECT gsf1.*, classify.classcode, classify.classgrup ;
>    FROM gsf1 ;
>        LEFT JOIN classify ON gsf1.contactno = classify.contactno ;
>   WHERE classify.classgrup = 'JOBTYPE'
>
Right, but that gives the wrong results. This won't pick up any records without classifications, but I want all the contacts, whether or not they have a jobtype. The following query will probably do the right thing....
SELECT gsf1.*, NVL(classify.classcode, 'BLANK     ') AS classcode, ;
    NVL(classify.classgrup, 'JOBTYPE   ') AS classgrup ;
    FROM gsf1 ;
        LEFT JOIN classify ON gsf1.contactNo = classify.contactNo ;
    WHERE classify.classgrup = 'JOBTYPE'
You can be so much more productive when you go out to a baseball game in the middle of a case of brainlock....
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform