Display only distinct records and sorting in dropdown

  • Thread starter Thread starter Sean
  • Start date Start date
S

Sean

Hi,

I am facing a problem and would like to know whether it is possible to do so.

i am retrieving a refcursor which has a list of last names, first names, address, city, state, and zip.

I pick up this information and populate a dropdown list. I was wondering if it is possible to pick up distinct records, and sort them out by last name?

Suggestions are welcomed.
 
If you're asking about what the command text, or SQL statement would be
to do this, it would be this:

"select distinct last_name, first_name, address, city, state, zip
from whatever_my_table_is
group by last_name, first_name, address, city, state, zip
order by last_name, first_name"
 
Back
Top