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: Beginner SQL question

Re: Beginner SQL question

From: Christopher Beck <clbeck_at_us.oracle.com>
Date: Fri, 05 Mar 1999 23:07:08 GMT
Message-ID: <36e26153.32245676@inet16.us.oracle.com>


On Fri, 05 Mar 1999 21:43:56 GMT, "rmaggio" <rmaggio_at_courts.state.ny.us> wrote:

>I am trying to retrieve all records that contain NULL in a paticular field
>and from those, only a single occurance of a SSN. Somewhat like:
> Select * from Table where addresss = NULL
>and ( select * from that resultset where their SSN is not repeated)
> So out of the ones that have nothing in a feild, I only want a single
>occurance of the record based on their SSN. (i.e Two records for customer
>123-45-6789 only show up once) Thanks for your help
>Bob

try...

select distinct *
  from T
 where address is null
/

hope this helps.

chris.

> rmaggio_at_courts.state.ny.us
>or
>zekmoe_at_aol.com

--
Christopher Beck
Oracle Corporation
clbeck_at_us.oracle.com
Reston, VA.



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Mar 05 1999 - 17:07:08 CST

Original text of this message

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