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: Use of NVL()

Re: Use of NVL()

From: damorgan <dan.morgan_at_ci.seattle.wa.us>
Date: Tue, 05 Feb 2002 17:57:23 GMT
Message-ID: <3C601D02.BE33CA2D@ci.seattle.wa.us>


Sounds to me like you are trying to turn Oracle into SQL Server. There is no "make Oracle as dumb as dirt switch." And I can't imagine any generic reason why you would need to do what you are trying: It is a solution begging for problems.

I would suggest that you reconsider this line of thinking and either substitute some visible value (for example NVL(myfield, 'ZZYZX') in the NVL situation or just leave the nulls alone.

Daniel Morgan

Andy Rigby wrote:

> I need to treat NULLs as empty fields in several places in my database
> app, and I am considering using the NVL() function to achieve this,
> eg:
>
> select * from fred order by nvl(surname,' ')
>
> or
>
> select * from fred where nvl(surname,' ') < 'Smith'
>
> Is there likely to be a big performance problem from doing this? NVL()
> is a function so perhaps I will need to create function based indexes
> to avoid speed problems?
>
> Or is there a configurable parameter somewhere that will treat NULLs
> as if they were empty fields, something like SQL Server's 'set ANSI
> NULLs' thing??
>
> Thanks
>
> Andy
Received on Tue Feb 05 2002 - 11:57:23 CST

Original text of this message

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