Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Percentage in sql
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01159615
Message ID:
01159620
Views:
15
>I am trying to percentage but i error
>
>SELECT scode,descr,lcode,sec,;
>TRANSFORM(round(CAST(sum(obt05)) AS I) ;
>                  /;
>               COUNT(code) *100;
>             ,2),"###%") AS sPER;
> WHERE examcode=thisform.code.value .and.scode="H";
> FROM Examtran;
> GROUP BY lcode,sec;
> into cursor hsper
Many brackets in you code:
TRANSFORM(round(CAST(sum(obt05) AS I) /COUNT(code) *100,2),"###%") AS sPER
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform