I am using a where filter that looks like the following:
STR(id, 19, 0) + STR(other_id, 5, 0) IN
(SELECT MIN(STR(id, 19, 0) + STR(other_id, 5, 0)
FROM tablex GROUP BY id)
I am pulling the first record encountered for the ID field, and using that in a report. TableX has valid records in it. The error "Invalid Key Length" comes up when I execute the entire SQL. I swapped out the TableX for another table, let's say TableY. The query works fine for TableY.
I looked at the Visual FoxPro 7.0 help for the error and figured it was an index problem. So I eliminated ALL of the indexes for ALL of the tables in the query. The error still persists!
What was very interesting, the error did not occur in Visual FoxPro 8.0!
Does anyone have any idea what is going on here?