Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Beginner SQL question
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.