[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: forcing null values into #variables?
- Subject: Re: forcing null values into #variables?
- From: Charles Thompson <THOMPSONC@TRANSPOWER.CO.NZ>
- Date: Tue, 15 Dec 1998 13:38:03 +1300
- A1-Type: MAIL
- Alternate-Recipient: prohibited
- Hop-Count: 2
- Importance: normal
- In-Reply-To: <69D5E27694F6D111AF5700805F6FEA2B011C636C@CON-MSX3>
- Mr-Received: by mta TRANS1; Relayed; Tue, 15 Dec 1998 13:38:04 +1300
- Mr-Received: by mta WNMR1; Relayed; Tue, 15 Dec 1998 13:36:57 +1300
- Posting-Date: Tue, 15 Dec 1998 13:38:05 +1300
- Priority: normal
- Sensitivity: Company-Confidential
- Ua-Content-Id: E453IRU2XZQ4
- X400-Mts-Identifier: [;40833151218991/984301@TRANS1]
Steve,
Sorry to stick my nose in here, but I feel I must have my say !
You seem to have run afoul (note nautical reference) of a database design trap:
Trying to derive multiple meanings from a single field. Numeric fields should
NEVER allow nulls, in my view (and SQR agrees). You should use another field
if you wish to convey one or more of the following :
- The numeric value has not yet been entered
- The value is not known
- The value has been cleared/deleted
- The field is invalid based on other field values
In this case, another Yes/No field should be used to indicate that there is no
information available currently.
- Charles Thompson
>>>Why is a zero unacceptable? The business I'm supporting is Shipping Loss
>>>Control. The column in question is a measurement of liquid cargo lost. The
>>>measurement may not have been taken, in which case a NULL is the correct
>>>answer (no information available). If the measurement was taken and zero is
>>>the answer, we had a very good voyage (no cargo lost). I can't use zeroes,
>>>or any other number, to represent the lack of a measurement. Sybase
>>>understands the distinction and allows resetting numeric columns to NULL in
>>>ISQL. Why shouldn't it be possible in SQR? I'm trying to retain the
>>>numeric attributes (so I can do more math with the number) for when I do
>>>have a measurement.
>>>
>>>Thanks,
>>>Steve
>>>> -----Original Message-----
>>>> From: Wanko, Christopher G, CFCTR [SMTP:apollo@att.com]
>>>> Sent: Monday, December 14, 1998 11:44 AM
>>>> To: 'SMAU@CHEVRON.COM'
>>>> Subject: RE: forcing null values into #variables?
>>>>
>>>> > Is there a way to force a null value into a #variable? I
>>>>
>>> (SNIP)
>>>
>>>> You may different responses, but perhaps you might explain why a zero is
>>>> an
>>>> unacceptable result to you.
>>>>
>>> (SNIP)
>>>
>>>> -Chris
>>>>
>>>>