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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Help! How to insert an empty string without converting to null

Re: Help! How to insert an empty string without converting to null

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 30 Sep 2000 08:25:27 +0200
Message-ID: <dn1btsoco0vn8q8iaj7pfmh00vn280akji@4ax.com>

On Fri, 29 Sep 2000 17:44:24 -0700, "Igor Shmulevich" <igors_at_csd.uwm.edu> wrote:

>I am using JDBC to insert data into Oracle and MS SQL 7 databases. One of
>the major differences is that when I pass an empty string (e.g., String str
>= "") to MS SQL it does exactly what is expected - inserts a blank string
>into the database. Oracle, however, inserts a null value instead. So, when
>the data is retrieved, one can see str = null, rather then str = "".
>
>I hope this is just the default behavior for Oracle and it can be changed.
>The question is how?
>
>Thanks in advance,
>
>Igor
>

Oracle doesn't differentiate between empty strings and NULL. So yes this is the default behavior
and NO it can not be changed.
You can either

a) submit an enhancement request by means of an ITAR
b) learn to live with it
c) stick to sqlserver


Regards,

Sybrand Bakker, Oracle DBA Received on Sat Sep 30 2000 - 01:25:27 CDT

Original text of this message

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