Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Tim Cooke
Paul Clapham
Liutauras Vilda
Sheriffs:
Junilu Lacar
Rob Spoor
Jeanne Boyarsky
Saloon Keepers:
Stephan van Hulst
Carey Brown
Tim Holloway
Piet Souris
Bartenders:
Forum:
Android
how to get distinct names from a table
shawn peter
Ranch Hand
Posts: 1325
1
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a table shich contain name of persons.I need to get the distinct names of the table.How can i do this?below is the example os table
Monday Tuesday Wednesday Thursday Friday
Tom Jhon Tom ULF Steve
William Nazee Jim Steve Sam
Sam ULF Steve ULF Tom
Steve Luke
Bartender
Posts: 4179
22
I like...
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Create a Collection which does not allow duplicates. Iterate all the element in the table and add them to the Collection. The Collection would then have only unique names. See
http://docs.oracle.com/javase/tutorial/collections/
and the API for the known subinterfaces of Collection (
http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html
) to pick which Collection might be best to use.
Steve
shawn peter
Ranch Hand
Posts: 1325
1
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thaks Steve.
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Sample SQL question
Cannot perform SQL UPDATE null
Counting identical items in DB
Need help with a query (HQL)
Unpublished books you are waiting for
More...