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: Am I crazy or what?

Re: Am I crazy or what?

From: Matthias Hoys <idmwarpzone_NOSPAM__at_yahoo.com>
Date: Sat, 14 May 2005 12:18:38 +0200
Message-ID: <4285d07f$0$20866$ba620e4c@news.skynet.be>

"DA Morgan" <damorgan_at_x.washington.edu> wrote in message news:1116046608.38345_at_yasure...
> gaby_at_ieee.org wrote:
>
>> Hi,
>>
>> I'm using the ojdbc14.zip JDBC driver againts an oracle 10g database.
>>
>> I'm getting one crazy result from a select.
>>
>> select ...,nvl(attr,'') as attr, ...
>> from .... where ...
>>
>> The attr attribute is a varchar2(150) that allow nulls.
>>
>> I do resultSet.getString("attr") and it returns me NULL for that
>> attribute!!
>>
>> Is there *any* condition under which the nvl function doesn't return
>> null?
>>
>> *What* is what I'm doing wrong, for the love of God?
>>
>> TIA,
>> Gabriel
>
> Not crazy but ignorant. Which ... don't take this personally ...
> applies to about 98% of all Java developers that are given access
> to databases. Not more than a handful of you folks, in the last 5
> years of experience I've had, has ever read the concept and
> architecture manuals of the database against which you are working.
>
> You just treat the database like a file system and then stare in
> amazement when it doesn't do what you expect.
>
> In this case it has been an Oracle default from likely before you
> were born that in Oracle an empty string is equivalent to NULL.
>
> And no diety or dieties had a thing to do with it.
> --
> Daniel A. Morgan
> University of Washington
> damorgan_at_x.washington.edu
> (replace 'x' with 'u' to respond)

Well the same can be said for most of the ASP/.NET developers (and I can know, I was one of them ;-)). There's simply no time to study the database concepts ! (especially if you are both developing for MS SQL Server and Oracle) My former boss : "A book about the Oracle internals ? Why do you need that for ? Stop waisting your time and start developing now !" :-). That's why having a good experienced DBA that can "coach" a team of developers is so important IMO, instead of letting the DBA's clean up things afterward ... Received on Sat May 14 2005 - 05:18:38 CDT

Original text of this message

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