CREATE CURSOR crsTest (cCode char(4)) INSERT INTO crsTest VALUES('0001') INSERT INTO crsTest VALUES('0001') INSERT INTO crsTest VALUES('0001') INSERT INTO crsTest VALUES('0001') INSERT INTO crsTest VALUES('0002') INSERT INTO crsTest VALUES('0002') INSERT INTO crsTest VALUES('0002') INSERT INTO crsTest VALUES('0002') CREATE CURSOR crsTest1 (cCode char(4)) INSERT INTO crsTest1 VALUES('0001') DELETE crsTest; FROM crsTest; LEFT JOIN crsTest1; ON crsTest.cCode = crsTest1.cCode; WHERE crsTest1.cCode IS NULL SELECT crsTest BROWSE NORMAL **** TA - DA whole crsTest cursor apears here **** no marked records at all.From help:
FROM [FORCE] Table_List[[, Table_List...] | [JOIN [Table_List]]] Specifies one or more tables containing the data for the delete operation. The FROM clause has the same syntax as in the SQL SELECT command except for the following restrictions: The target table or cursor cannot be included in an OUTER join as a secondary table or cursor. It should be possible to evaluate all other JOIN operations before performing a JOIN operation on the target table. The target cursor cannot be the result from a subquery. For more information, see SELECT - SQL Command.But crsTest is not a second table in the JOIN. the select:
SELECT *; FROM crsTest; LEFT JOIN crsTest1; ON crsTest.cCode = crsTest1.cCode; WHERE crsTest1.cCode IS NULLworks as expected.