Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to sum records,HELP
Message
From
19/03/2002 02:27:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00633512
Message ID:
00634362
Views:
19
That comma is mandatory there. It's in fieldlist.
select first_name, last_name from employee
wouldn't error but :
select first_name last_name from employee
or
select first_name, last_name, from employee

would. If you could paste the erroring version it'd be helpfull :)
Cetin




>>Which comma Matthew ? There is no comma after 'from myTable'. Would you paste the code that's not working.
>>Cetin
>>
>>>Is the comma after the 'SELECT myTable, ;' the trick to making this work? I tried and tried to use SUM() 2 times in the same SELECT with VFP giving me errors about unrecognized command verb and syntax. The only difference I can see is that comma.
>>>>
select empno, ; && the comma after empno is the one in question, my apologies for the misleading question
>>>>  sum(iif(code='AB',1,0)) as NumberAB, ;
>>>>  sum(iif(code='AB',time,0)) as DurationAB, ;
>>>>  sum(iif(code='OT',1,0)) as NumberOT, ;
>>>>  sum(iif(code='OT',time,0)) as DurationOT ;
>>>>  from myTable ;
>>>>  group by empno
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform