Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select (SQL) -- field does not accept NULL values
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00692839
Message ID:
00874177
Vues:
20
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
Fil
Voir

Click here to load this message in the networking platform