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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top