Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with a select to cursor with adding two $ together.
Message
De
21/06/2000 13:15:19
Cindy Winegarden
Duke University Medical Center
Durham, Caroline du Nord, États-Unis
 
 
À
21/06/2000 12:34:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00382550
Message ID:
00382795
Vues:
20
Actually, VFP follows the ANSI SQL-92 standard here which means you can use
SELECT ;
    tally.manstart - tally.manend tmansold ;
    ...
Notice that you can choose to use AS or just plain follow the expression with it's desired name in the result cursor.

I really thought your AT was a typo. There is no AT in SQL-92.



>You use AS when you want to name the column in the resulting cursor. If you don't care what the name of the column is FoxPro will name the column for you something like "Expression1".
>
>>Should I use AS all the time instead?

>>>The following code demonstrates this in full:
>>>
create cursor tally (manstart Y, manend Y)
>>>insert into tally values($500, 200)
>>>insert into tally values($1500, 800)
>>>SELECT ;
>>>   tally.manstart - tally.manend AS tmansold ;
>>>   FROM tally ;
>>>   INTO CURSOR curslp
>>>brow
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform