Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL - madness!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00029782
Message ID:
00029804
Vues:
29
>Lucien,
>
>One thing I would try (I have *not*) is:
>
>. . . ; (tot_beans / beans_month) * 000000001.0000 ) as month_avg
>
>Who knows - might do the trick
>
>good luck,
>Jim N
>
>>my iif is something like;
>>
>> iif( tot_beans / beans_month 0, 000000000.0000, ; tot_beans/beans_month) as month_avg ;
>>
>>so how does one figure the resulting structure, and others are a mixture of multiply and divide....
>>just to be more interesting...

Lucien (& Jim & Larry): This sounds similar to my problem last week.
From Edward Pikman's answer to me:

SELECT sum(lineitem)+000000000 as linetotal, ;
sum(iif(taxable, lineitem, 0))+000000000 as taxtotal ;
from MyTable into cursor MyCursor

Add reasonable number of zeros.
The reason was that Foxpro allocates cursor field width (if AS clause used) based on first selected record.


Me again - Note how Edward puts the "format" code AFTER the IIF() statement, not inside it. If you have a standard code for each field in all 3 Selects, it might solve the problem. It certainly solved MINE.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform