I'm new to oracle.
I don't understand how can empty strings be the same as NULL.
I don't know if it is an ansi sql standard or not but
I thought that logically (like in postgresql) empy strings
are different objects from "null".
However, I have the following problem:
Because of an unknown ORA-32255 error I can't read rows
wich contain null clob values.
But I need the possibility of empty fields (null or empty is
not important for me in this case). But when I set a value to
'' it is interpreted as a "null" and the ORA-32255 error comes back.
Does anyone know a way around this ?
Thanks,
Marko Mikulicic
PS:
I'm using a wrapper library around OCI (a clone of EOF 1.0 called gstep-db
that works well.)
--
Terry Dykstra
Canadian Forest Oil Ltd.
"Marko Mikulicic" <nos...@spamseul.org> wrote in message
news:9n2i8n$fb3b$1...@as201.hinet.hr...
A string of zero length ('') is not equivalent to a NULL
value. According to the ANSI SQL 1992 Transitional standard, a
zero-length or empty string is not the same as NULL. Ensure that
applications do not treat empty strings and NULL values equivalently.
This can be found under " Oracle8 and Oracle8i Desupported and
Deprecated Features". I'd suggest NOT to use an empty string as a
representation of a NULL value as they are semantically different.
best regards
"Terry Dykstra" <dontreply...@cfol.ab.ca> writes:
> In Oracle null and empty string are the same. Not ANSI standard, but that's
> the way it is.
>
> --
--
===============================================================
Miko ,B3 (Baj Morzy
Instytut Informatyki Institute of Computing Science
Politechniki Pozna ,Bq (Bskiej Poznan University of Technology
ul. Piotrowo 3A ul. Piotrowo 3A
60-965 Pozna ,Bq (B 60-965 Poznan, POLAND
e-mail: DONTLIKESPAM...@cs.put.poznan.pl
tel. : +48 61 665 21 27
fax : +48 61 877 15 25
===============================================================
>
> Quoting Oracle9i documentation:
>
> A string of zero length ('') is not equivalent to a NULL
> value. According to the ANSI SQL 1992 Transitional standard, a
> zero-length or empty string is not the same as NULL. Ensure that
> applications do not treat empty strings and NULL values equivalently.
>
> This can be found under " Oracle8 and Oracle8i Desupported and
> Deprecated Features". I'd suggest NOT to use an empty string as a
> representation of a NULL value as they are semantically different.
I'd like to tread them differently but "select * from a where b is null"
returns them. I'm not using that deprecated feature, it's using me !
Also the wrapper library which I use
returns me a null objects. It gets this info testing (-1) the indicator
from a define (usig the function "odefin").
Is "odefin" part of and older interface wich doesn't conform to the ANSI
SQL 1992 Transitional standard ? Is there a way to set ansi compliant
behavior globally or per session ?
Marko