Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT ... JOIN Syntax
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00126277
Message ID:
00126468
Views:
18
>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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform