Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help forming field value
Message
De
02/04/2000 13:47:48
 
 
À
01/03/2000 15:34:05
Michael Dougherty
Progressive Business Publications
Malvern, Pennsylvanie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00340063
Message ID:
00354043
Vues:
22
>sum(a.tvol)-NVL(sum(b.totcxlvol),000) as tvoladj;
>or
>NVL(sum(a.tvol)-sum(b.totcxlvol),sum(a.tvol) ) as tvoladj;
>
>Which syntax is better?
>
>I was wondering if the duplicate occurance of "sum(a.tvol)" was a performance killer.

I think the correct phrasing would be:

SUM(a.tvol) - SUM(NVL(b.totcxlvol,000)) as tvoladj

since the occurance of b.totcxlvol might be null on any given instance, rahter than the sum being NULL; I'm not certain that this applies inside the SUM() phrase in a select, but try the following to become a potentially unhappy camper:

? 3 + NULL
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform