>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.
>I know I could use the nvl-function zo get the result as number 0 but I would like to know if I have missed a setting in VFP9 to emulate the old behaviour.
>
>Best regards
>
>Thomas
Hallo Thomas,
- not that I know of a setting
- do not use NVL, use ... WHERE kundennr = 9999999 AND betrag IS NOT NULL instead. You wouldn't like to sum the nulls anyway?
I think the result .NULL. is correct and better then 0. .NULL. is to be read as
I don't know, so number +
I don't know is equal
I don't know, not 0
(Watch out the boolean operators with .NULL. for example 1 AND .NULL. equals .NULL. while 0 AND .NULL. equals 0, .OR. does the opposite, this is determined by boolean logic and perfectly fine)
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]