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 10:36:24
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
 
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:
00382685
Vues:
22
Should I use AS all the time instead?



>Hi Peter,
>
>This statement should work:
>
SELECT ;
>   tally.manstart - tally.manend <b>AS</b> tmansold ;
>   FROM disppro!tally ;
>   INTO CURSOR curslp
>Notes:
>- First, I assume you want to subtract (rather than add as you said in your note).
>- The case of the commands is not relevant, I've simply made Fox keywords upper case as a matter of convention
>- To name a calculated column in a SELECT-SQL statement, use the AS keyword (rather than AT)
>
>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
>
>HTH
>
>Cheers,
>
>Andrew
>
>

>
>>I need help getting a SELECT to work that needs to add two columns together...
>>
>>Here is the select....
>>
>>select ;
>>tally.manstart-tally.manend at tmansold ;
>>from disppro!tally ;
>>into cursor cursclp
>>
>>Why does this produce an error? I tried putting SUM ( ) around it as well but that didn't work.
>>
>>Help.
Peter Brama
West Pointe Enterprises

VFP is getting easier but STILL alot to learn!!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform