The SELECT-SQL statement that uses an OUTER JOIN clause adds NULL values to the output in Visual FoxPro (238518)
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 Q238518 SYMPTOMS
Executing a SELECT-SQL statement using an OUTER JOIN clause results in null values being inserted into the fields of the output for which no matching record is found.
RESOLUTION
If the SELECT-SQL statement is being used to output data to a table, one workaround is to issue an ALTER TABLE command and set the columns of the table to NOT NULL. The following code illustrates this workaround:
SELECT ALIAS()
FOR i=1 TO FCOUNT(ALIAS())
ALTER TABLE (ALIAS()) ALTER COLUMN (FIELDS(i)) NOT NULL
ENDFOR
This workaround is implemented in the code example in the MORE INFORMATION section following.
Modification Type: | Major | Last Reviewed: | 3/18/2005 |
---|
Keywords: | kbCodeSnippet kbDatabase kbpending kbprb kbSQLProg KB238518 |
---|
|