Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sum fields
Message
From
19/03/2005 14:00:44
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
19/03/2005 13:31:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 5
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00997609
Message ID:
00997620
Views:
12
>hi,
>the type is character.

>>>SELECT nam1, SUM( innoumber),sum(t1),sum(t1) AS bill_total,t1,t2 FROM Mstr WHERE ;
>>> BETWEEN( datein, ldStart, ldEnd ) ;
>>> GROUP BY nam1 ;
>>> ORDER BY nam1 INTO CURSOR qTmp
>>>
>>>thanks
>>
>>What is the type of field NAM1? I think you can't group by memo fields.

I don't know; since SQL - SELECT statements are fairly complex, you might start from the statement and eliminate elements, until it works; or start from a simpler statement and continue adding elements, until you get an error.

I find the following items strange about your command, although I don't know whether they cause the error:
  • Why do you sum field T1 twice?
  • Why does field T1 appear both summed and not summed?
  • It is safer to give a name (AS) to all summed fields. However, this should only affect the name of the result, and not result in an error message.
  • Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
  • Previous
    Next
    Reply
    Map
    View

    Click here to load this message in the networking platform