I have a table that I want to output into a series of drop down menus. Each field has duplicate entries that cannot be removed. Using a query I want to pull all of the data from the table at once. I only want to display the distinct entries from each field. I cannot use SELECT DISTINCT in the query though because all entries are distinct. I need to be able to pull distinct fields and all data at the same time. I put an example below that I hope explains what my table looks like a little better.
hierarchyID domain directory subdirectory subdirectory2
about docs images
about docs forms
My query is
<cfquery name="gethierarchy" datasource="Review">
ORDER BY hierarchyID ASC
I would like to display the distinct directory, subdirectory,... For example I'll want to pull only subdirectories in the "about" directory. As you can see in my example table above that there are duplicate entries under each field but the complete database entry is not a duplicate. Is there a way to do something like <cfouput query="gethierarchy">DISTI
tory#) so that I can just run the query once but output the distinct items?