The cASE is killign you - try selecting the UPPER() or LOWER() of the reference column.
-----Original Message----- From: cf coder [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 October 2004 8:30 To: CF-Talk Subject: Select distinct record - help Hello everybody, I was wondering if someone could help me. I am trying to get the distinct record from a select statment. Here is the code. <cfquery name="getEmployeeDetails" datasource="db"> select distinct reference, uniqueID, firstname, lastname FROM employee WHERE reference = 'cfcoder' ORDER BY reference asc </cfquery> This brings back 2 records, and I want it to only return 1 row. <select name="custname" id="custname"> <cfloop query="getEmployeeDetails"> <option value="#reference#">#reference#</option> </cfloop> </select> The data in the table looks like this 1 cfcoder cf coder 2 CFCODEr cf coder There are two rows in the table with the same reference. How do I get it to only display 1 record. Can somebody please help ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=34 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181979 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

