SELECT-SQL returns invalid rows when filtering outer join on child table (268022)
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
This article was previously published under Q268022 SYMPTOMS
The SELECT - SQL command may return .NULL. records in a left-outer join when you filter the child table for EMPTY() records. This is not the way that SQL Server handles identical data and statements.
RESOLUTION
If you want to filter on the child table and only see matching records, you should use an INNER JOIN. However, if you want to see all parent records but only those children that match the filter, you should include the filter condition in the JOIN clause. For more information, see the Microsoft Knowledge Base article in the "References" section to follow.
REFERENCESFor additional information about filtering in JOIN clauses, click the article number below
to view the article in the Microsoft Knowledge Base:
268906 HOWTO: Filter in a JOIN Condition
For additional information about the SELECT command, see the Visual FoxPro Language Reference and the SQL Server Books Online.
Modification Type: | Minor | Last Reviewed: | 4/15/2005 |
---|
Keywords: | kbCodeSnippet kbDatabase kbpending kbprb kbSQLProg KB268022 |
---|
|