Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why becoming error(operand type mismatch
Message
From
17/09/2005 14:00:41
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Database:
MS SQL Server
Miscellaneous
Thread ID:
01050437
Message ID:
01050623
Views:
13
>Total/obtain*100
>Total =tobt and obtain is =CAST(SUM(IIF(result="Fail",1,0)) AS I)
>
>TRANSFORM(ROUND(count(tobt)/CAST(SUM(IIF(result="Fail",1,0))*100,2),"##.##") AS PERCENTAGEu;
>i am missing something
TRANSFORM(ROUND(;
                COUNT(tobt);
                  /;
                CAST(SUM(IIF(result="Fail",1,0)) AS I) *100;
             ,2),"##.##") AS PERCENTAGEu;
you can omit casting here:
TRANSFORM(ROUND(;
                COUNT(tobt);
                  /;
                SUM(IIF(result="Fail",1,0))*100;
             ,2),"##.##") AS PERCENTAGEu;
More correct is:
TRANSFORM(100*ROUND(;
                COUNT(tobt);
                  / SUM(IIF(result="Fail",1,0));
             ,4),"##.##") AS PERCENTAGEu;
Previous
Reply
Map
View

Click here to load this message in the networking platform