Have a database table with various tasks and each has a time against it that it should take, some tasks have the same time. I now need to display these times in a drop down list but only want to display each time once, how can I do this?
Jump to Post
Try something like this substituting your table and field names:
select table.timefield, count(table.timefield) AS NumberOf FROM table GROUP BY table.timefield HAVING NumberOf > 1
This should give you only times where there is more than on row and the number of rows.
All 3 Replies
Be a part of the DaniWeb community
We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.