How to add the filter condition to the JOIN clause in a SELECT-SQL command in Visual FoxPro (268906)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Windows 7.0
- Microsoft Visual FoxPro 8.0
- Microsoft Visual FoxPro 9.0 Professional Edition
This article was previously published under Q268906 SUMMARYWhen you are doing OUTER JOINs on tables, you might occasionally want to filter on the side of the table that would otherwise return NULLs. However, if you filter by using a WHERE or HAVING clause, you eliminate all the records on the parent side of the join that do not match the condition.
To get the desired results, you can add the filter condition to the JOIN clause.
REFERENCES
For additional information about the SELECT - SQL command, see the Visual FoxPro Help file. For additional information about filtering OUTER JOINS, click the article number below
to view the article in the Microsoft Knowledge Base:
268022 PRB: SELECT Returns Invalid Rows When Filtering Outer Join on Child Table
Modification Type: | Major | Last Reviewed: | 3/10/2005 |
---|
Keywords: | kbCodeSnippet kbhowto kbSQLProg KB268906 |
---|
|