Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Weird Query

Re: Weird Query

From: Andreas Mosmann <keineemails_at_gmx.de>
Date: Tue, 02 Aug 2005 08:58:19 +0200
Message-ID: <1122965899.95@user.newsoffice.de>


Turkbear schrieb am 01.08.2005 in
<knise1tt0au2ffpss32ars064rsuevpsfl_at_4ax.com>:

> Andreas Mosmann <keineemails_at_gmx.de> wrote:

>> Turkbear schrieb am 01.08.2005 in
>> <vlese1hl24777o6jalga0j7tvlrg787n8j_at_4ax.com>:
>>
>> I read all above, but only for being sure:
>>
>> There is no way to tell an oracle database that there is a known
>> zero-value string? This information depraves to NULL?
>>
>> wondering
>>
>> Andreas

> NULL means Unknowable, so NO, you cannot tell Oracle that some/all NULLS are > anything but NULL.
Excuse my English, let me find an Example:

if a value is NULL then it means to me there is no message/ undefined. if there is a form where only fields are shown that still are undefined so I do not have a chance to tell this form, that the value is defined but emtpy. for my opinion '' is another thing than NULL.

example (there are surely better ones):
TADDRESS

ForeName1 VARCHAR2(30);
ForeName2 VARCHAR2(30);
ForeName3 VARCHAR2(30);
LastName  VARCHAR2(30);

You never can tell, how many forenames a person owns (except 3), You only can tell, how many forenames you know. There is no possibility for a user to tell, that 2nd and 3rd forename does not exist. For that case you would need a workaround, like an extra column or a predefinded emty-value for forenames.

> ( A Zero value string has a length of 0, so it cannot have a value ( what > would be known about it other that its length?)) Its length sometimes is enough

> Why do you care..Oracle handles it just fine. I do not think so

> When using it in a Where clause test for both blanks and Nulls with
> ( If trim( stringField) = '' or 
>   stringField IS NULL) 

In my mind these are 2 different things so you of course need 2 terms, you want to find unknown values and you want to find empty values. (so I follow the question of Marian: But 0 is still 0 and not NULL ;) )

> Or use Oracle's NVL function to have Nulls return a specified value I know this function, but it doesnt answer how to store a defined zero- value in a string- column

Andreas

-- 
wenn email, dann AndreasMosmann <bei> web <punkt> de
Received on Tue Aug 02 2005 - 01:58:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US