Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.Null.-value instead of number
Message
De
14/12/2020 03:27:57
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
09/12/2020 16:13:17
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01677502
Message ID:
01677557
Vues:
48
>>Hi there,
>>
>>in VFP8 I could do the following qzery:
>>
>>SELECT sum(betrag) FROM faktur WHERE kundennr = 9999999 INTO Cursor mycursor WHERE kundennr = 9999999
>>
>>and get a Cursor with a numeric field (or an array[1]-value) containg the value 0 when the query did not get any records.
>>
>>In VFP9 I get the field of my result-cursor filled with .NULL.

Yup, the behavior changed in VFP9 in exactly that manner. It was one of the 5-6 things for which I had to scour the whole app when we switched from 8 to 9. If you have an aggregate function and it finds no records, you still get one record in the result and it contains a null in the result field.

So either stay compatible with VFP8 or adjust the code to reflect this.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform