THE SITUATION:
--------------
I have 2 tables that I am trying to LEFT OUTER JOIN together, and
limit the result by a subselect from a third table.
Let's call the two joined tables L and R, and the limiting table
IDTable. We'll assume that the IDTable contains only 1 column called
ID, and that LeftTable and RTable also have ID columns.
The SELECT looks like this:
SELECT L.Fld1, L.Fld2, L.Fld3, R.Fld8
FROM L LEFT OUTER JOIN R on L.SomeField == R.SomeField
WHERE L.Id IN (SELECT ID as Garbage from IDTable)
(I'll explain why I'm renaming IDTable.ID AS GARBAGE below)
THE PROBLEM:
------------
The LEFT OUT JOIN works, and the limiting by the ID table works.
HOWEVER, one of the columns in the resulting cursor (usually the third
or fourth column) is replaced by the GARBAGE Column (renamed from
IDTable.ID so that it would be easier to find).
EG:
For the select above, the output columns SHOULD BE:
Fld1 Fld2 Fld3 Fld8
BUT INSTEAD, they are:
Fld1 Fld2 Garbage Fld8
QUESTION:
---------
I can reproduce this behavior at will and it sure looks like a bug in
VFP 5.0 to me.
What does everyone else think about this seeming bug?