Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select (SQL) -- field does not accept NULL values
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00692839
Message ID:
00874177
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform