Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL & COUNT() problem
Message
From
26/06/1997 06:08:00
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
SQL & COUNT() problem
Miscellaneous
Thread ID:
00037774
Message ID:
00037774
Views:
82
I have something to do and maybe there is somebody out there having a better solution.

I have a table like that :

JOB# TICKET# CLIENT# DONE
1 1 1 yes
1 2 1 no
1 3 1 yes
2 1 2 yes
2 2 2 yes
3 1 3 yes
3 2 3 no

I need a SQL select (or some other solution) to produce the following
cursor :

JOB# PROGRESS(%)
1 66%
2 100%
3 50%

So, the SQL result must have 1 record for each JOB# value and the second column is defined as :

100 * (How_Many_records_with_DONE=YES / How_Many_records

If you have any decent solution for that please let me know. This
cursor have to be updated every 10 seconds and there are milions
of records in the main table.
Next
Reply
Map
View

Click here to load this message in the networking platform