Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with a select to cursor with adding two $ together.
Message
From
21/06/2000 10:36:24
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00382550
Message ID:
00382685
Views:
21
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!!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform