O$: Null Fields

Christine Penner christine at ingenioussoftware.com
Tue Apr 21 12:34:54 EDT 2009


I have looked through the past discussions on nulls. I asked a 
similar question before but they are all more general then what I'm 
looking for. We have decided that we will be dealing with nulls. What 
I want is some suggestions on how to deal with specific things like 
the example I gave. I could write a pile of code checking nulls but I 
thought someone may have a more elegant solution then what I would 
come up with.

Christine

At 09:03 AM 21/04/2009, you wrote:
>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
>
>_____________________________________________________________
>Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list