SELECT * FROM mytable WHERE myUDF() INTO CURSOR myresult FUNCTION myUDF() *-- Some codes... IF myCondition lnWrk = SELECT(0) SELECT myresult LOCATE FOR condition1 IF FOUND() *-- Som something ENDIF SELECT (lnWrk) ENDIF RETURN .T. ENDFUNCVisual FoxPro returns empty record in result cursor for those records which match mtCondition.
SELECT * FROM mytable HAVING myUDF() INTO CURSOR myresult FUNCTION myUDF() *-- Some codes... SELECT myresult LOCATE FOR condition1 IF FOUND() *-- Som something ENDIF ENDIF ENDFUNCFabio