O$: Null Fields

Peter van Rooij petervanrooij at wanadoo.nl
Tue Apr 21 12:03:17 EDT 2009


Hello Christine

This subject has been discussed many times before and by more  
experienced developers than myself.
If you do not want to use nulls, don't use them but keep in mind :  
there is a big difference between a value null an an empty value. The  
last has been assigned and the first was not.

I suggest that you go through the archives to find more specific  
answers.

Greetings

Peter


On 21 apr 2009, at 17:23, Christine Penner wrote:

> Hi Everyone,
>
> We are in the process of converting our software to SQL. In the old  
> DML code we never had to deal with nulls much. Now I need some  
> advice how to deal with them in some specific problems that have  
> come up. We decided in most cases we don't want the overhead of  
> always clearing nulls after finding data.
>
> When we have one field we are looking at there is no problem. When  
> we have more than one it can cause problems. Here is an example. Any  
> suggestions would be appreciated.
>
> If (pOldRow.FF_HIRED<>pNewRow.FF_HIRED)| 
> (pOldRow.FF_PREVIOUS_MONTHS<>pNewRow.FF_PREVIOUS_MONTHS)
> In this case we compare old and new values to see if anything has  
> changed. Typically in this situation everything will be null except  
> pNewRow.FF_HIRED. It still fails though because of the nulls. We do  
> this type of thing all over the program. It would be good to not  
> have to write a pile of code each time checking for nulls.
>
> Christine
>
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list