Hi John
The VFP help cautions against using UDFs in SQL. Please explain what you are trying to do, so we can suggest alternatives.
>Hi,
>I have a SQL statement that call my UDF. In the UDF, I have code to LOCATE the result as following.
>
>
>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.
>ENDFUNC
>
>
>
>VFP returns empty record in result cursor for those records which match mtCondition.
>
>Any ideas?
>
>Thank you