Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debug this SQL statement...
Message
De
03/04/1998 02:22:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
03/04/1998 00:37:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00089155
Message ID:
00089174
Vues:
27
>Tell me whu this VFP code does not work:
>
>select (this.Field_List);
> from (this.table_name);
> order by (this.Order_By);
> into array (this.gaData)
>
>
>So therefore I had to go this route to get it to work:
>
>cField_List=this.field_list
>cOrder_By=this.order_by
>
>select &cField_List;
> from (this.table_name);
> order by &cOrder_By;
> into array this.gaData
>
>
>SQL doesn't seem to like (this.whatever)?
SQL also uses "this". But here the problem is with expressions. "Fieldlist" and "orderby" are not name expressions and thus you can't use () for them. For fieldlist when you use () then this.fieldlist would be an expression itself. You would get a column full of "this.fieldlist". The & operator is the only way to go here. Since tablename and destination are name expressions there is no problem there (also you wouldn't be able to use name expression in "where" clause).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform