This content has been marked as final. Show 1 reply
NOTE: I want the select list to display only the category_name, and for some reason if I change the return value fromThe CATEGORY_ID values are different. Presumably you have something like:
CATEGORY to CATEGORY_ID, I get multiple selections of the same name, as if the distinct part did not kick in.
If you use CATEGORY for both the display and return values, the DISTINCT will show only a single row for BLUE.
CATEGORY CATEGORY_ID BLUE 1 BLUE 2 BLUE 3
If you use CATEGORY for the display value and CATEGORY_ID for the return value, the DISTINCT will show three rows for BLUE.
I don't know the logic of your tables, so I can't say why this is the case, but it's the only explanation that matches your description.