Matthias Hoys wrote:
> "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 ...
I didn't mean to pick on Java developers. The same applies to C, C++,
C#, and just about every other generic front-end tool.
--
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Sat May 14 2005 - 10:23:05 CDT