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

Home -> Community -> Usenet -> c.d.o.server -> Re: storing an empty string

Re: storing an empty string

From: Niall Litchfield <niall.litchfield_at_dial.pipex.com>
Date: 30 Mar 2005 01:34:12 -0800
Message-ID: <1112175252.787531.54340@l41g2000cwc.googlegroups.com>

Markus Innerebner wrote:
> Hello
> I see while I am trying to store an empty java string in an oracle
> database, it will be converted to null.
>
> Is there a way to store an empty string in oracle without beeing
> converted automaticly.
>
> The problem is, that every time a read such data I get a null instead
"".
> So I need every time to reconvert it again.
>
> thanks for your help

I believe that the short answer is no, in Oracle databases the empty string *is* null. This tends to provoke religious wars about whether it should be or not, but it is so thats just tough really. I don't see anyway of doing what you want without a conversion step (though you might wish to find a character that you are 110% convinced will not ever appear in valid data and store the empty string as that character if you column really is nullable).

Niall Litchfield
Oracle DBA
http://www.niall.litchfield.dial.pipex.com Received on Wed Mar 30 2005 - 03:34:12 CST

Original text of this message

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