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: Finding Not Null values in a table

Re: Finding Not Null values in a table

From: Matthias Gresz <GreMa_at_t-online.de>
Date: Tue, 29 Dec 1998 08:22:09 +0100
Message-ID: <36888321.19BAC9B9@Privat.Post.DE>

nbrown_at_epnet.com schrieb:
>
> Hi-
>
> Can anyone suggest a convenient way to select from a large table only those
> fields whose values are not null for a particular row? I have a large table
> that I am trying to pull only the 'not null' fields for a particular key
> record. I am wondering if there is some way to 'select all not null values
> from big table where primary key = something' (I guess this is essentially
> select * but don't show me any fields whose value are null). Any ideas?
> Thanks a lot...
>
> Nathaniel

Do speed up the whole thing ensure that the field or fields are indexed, amybe by a compound index.

This will do the job

select

        *
from

        your_tab
where

        field1 > (select min(field1) from your_tab) AND
        field2 > (select min(field2) from your_tab) ;

HTH
Matthias
--
Matthias.Gresz_at_Privat.Post.DE

Always log on the bright side of life.
http://www.stone-dead.asn.au/movies/life-of-brian/brian-31.htm Received on Tue Dec 29 1998 - 01:22:09 CST

Original text of this message

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