Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Using distinct across several columns

Using distinct across several columns

From: Steve Wicklund <savant_7_at_hotmail.com>
Date: 14 Jan 2003 07:23:39 -0800
Message-ID: <5de96e4e.0301140723.6c9b091f@posting.google.com>


Hello all; I have fiddled with this syntax for a bit now. what is the syntax for finding results that are unique across several rows-- but not all. E.G.: a table has columns name, phone, street and order_number. I want to have all four columns retunred-- but one row for every unique combination of name, street and phone.

  name street phone order_number

  1. bob Oak st 555-1212 2525
  2. bob Oak st 555-1212 2521
  3. fred Oak st 555-1212 2529
  4. jerry Pine st 555-1212 2522
  5. bob Oak st 555-1212 2527
  6. jerry Pine st 402-1212 2560

In this case rows 1, 3, 4, and 6 would be returned.

Can this be done? Or is there a better way to pull of getting uniqueneess across 'N' number of rows.
Cheers. Received on Tue Jan 14 2003 - 09:23:39 CST

Original text of this message

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