Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL error for blank child table
Message
De
07/05/2003 09:51:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
07/05/2003 09:29:11
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00785687
Message ID:
00785775
Vues:
19
>When 2nd table has no matching records returned value is null causing sum() to be null. Check 'set null'. Also you can change your expressions to handle nulls. ie :
>
>instead of :
>SUM(Stockout.nqtyout)-SUM(Stockout.nqtyret) AS qtyout
>try :
>SUM( nvl(Stockout.nqtyout,0)-nvl(Stockout.nqtyret,0) ) AS qtyout

Çetin,

I agree in principle, but I suspect that that can cause fields that are too narrow (if the first records happen to have null values): better replace the 0 with something like 000000.00, or with $0, depending on the field type.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform