Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why becoming error(operand type mismatch
Message
De
17/09/2005 14:00:41
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Database:
MS SQL Server
Divers
Thread ID:
01050437
Message ID:
01050623
Vues:
19
>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;
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform