Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
To ALL,
I have a similar question, and am hoping to continue this thread... (years later and using VFP8)
I have a table where one of the fields accepts null values (lets call it nullfield1 and it is of type double with the null flag checked)
The following works just fine:
select field1, sum(nullfield1) from sometable group by 1
I also know that I can perform the following:
? .NULL. * 2
.NULL.
So... why can't I do this -
select field1, sum(nullfield1) * 2 as nullfield2 from sometable group by 1
***Error Message*** field nullfield2 does not accept NULL values
It seems reasonable, and I really have a need to solve this type of problem. Using NVL doesn't seem to work, because I really want to see both null values and not null values in the resultant select after they have been multiplied by 2 (or some other valid function that uses null values).
Thanks
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement