Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT in SELECT clause of SQL SELECT
Message
 
 
À
08/02/2006 09:08:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01094613
Message ID:
01094615
Vues:
13
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()   && Returns as string such as 'Field1,SUM(Field2) AS Field2'
>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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform