One way to avoid the use of a zero in place of a null if you want or need 
fields to contain something is to use a negative number or something so 
ridiculous that you know it’s wrong: 99999999 for instance or its negative.

Regards,
Alastair.



From: A.G. IJntema 
Sent: Saturday, June 25, 2011 4:01 PM
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Re: Issue with IFNULL and SET ZERO.

Karen,

 

I agree, but...

 

A long ago I was told to avoid empty numeric fields (when I still did some  
programming in COBOL) .

And I still like the idea behind it, because the results could be unpredictable 
and a null value could indicate that you have forgotten the field or variable.

 

Looking at the problem which is described maybe another column  should be added.

The way it is solved right now the lower price will be applicable as soon as 
somebody hits the enter button after filling in the lower price.

I don’t think this is an ideal situation

I think  adding a date – time column from when on the lower price will be 
applicable will improve the flexibility of the solution.

Then you are in total control of the situation and you are able to set lower 
prices at any moment and they will not be applicable until the date –time 
moment has come.

 

In that case even a 0 price is possible and you still can avoid null.

 

Tony

 

 

From: [email protected] [mailto:[email protected]] On Behalf Of 
[email protected]
Sent: vrijdag 24 juni 2011 0:41
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Issue with IFNULL and SET ZERO.

 

I wouldn't agree with that, Tony.   A $0 price is not the same as a null.  A 
null in the field means (I assume) that they have no idea yet what the price 
is.  And according to Larry a $0 is a valid price.   

Karen


In a message dated 6/23/2011 5:32:26 PM Central Daylight Time, 
[email protected] writes: 



My suggestion would be to avoid the null  value by setting the default value to 
0 . I assume the lowprice never will be really 0.00 (for free),

Then you can avoid the complicated if-statement



Tony




 

Reply via email to