An UDF in the field list can only return a value. If it returns field list than you have to use macro substitution. A subquery in the filed list can only return one value.
>Is it possible to include a UDF in the field list of an SQL SELECT in such a manner that it is interpreted as a field list? In other words, is there a tighter way of doing the following?
>
>
>junk = UDF()
>SELECT Field3,&junk,Field4 FROM xxx GROUP BY 1 INTO CURSOR yyy
>
>
>Is something like this what is meant by a subquery in the SELECT clause of the SQL SELECT statement? See Visual FoxPro 9.0 Language Reference SELECT - SQL Command - SELECT Clause in VFP9 help: "(Subquery) Subquery specifies a SQL SELECT statement within another SQL SELECT statement and must be enclosed within parentheses (()). "
>
--sb--