Why do you need a query to do this?  Can't you just look at Configuration-> CustomFields->YourCustomField and view its current value options?<br><br>If you need to do a SQL query, use:<br>SELECT DISTINCT CustomFieldValues.Name
 FROM CustomFieldValues JOIN CustomFields ON CustomFields.id=CustomFieldValues.CustomField WHERE CustomField.Name='YourCustomField' AND CustomFieldValues.Disabled=0;<br><br>If you want ALL customfieldvalues for the field (and not just the current ones) get rid of the Disabled specification.
<br><br>Forrest<br><br><div><span class="gmail_quote">On 8/8/07, <b class="gmail_sendername">James Moseley</b> <<a href="mailto:jmoseley@corp.xanadoo.com">jmoseley@corp.xanadoo.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am sure you can do this by using a single mysql command, but...<br><br>To get the numeric id of the custom field:<br><br>mysql> select id from CustomFields where Name='<custom field name>';<br><br>Grab the id, then:
<br><br>mysql> select * from CustomFieldValues where CustomField='<id>';<br><br>James Moseley<br><br><br><br><br><br>             Mathew Snyder<br>             <theillien@yahoo.<br>             com>                                                       To
<br>             Sent by:                  RT Users<br>             rt-users-bounces@         <<a href="mailto:rt-users@lists.bestpractical.com">rt-users@lists.bestpractical.com</a>><br>             lists.bestpractic
                                          cc<br>             <a href="http://al.com">al.com</a><br>                                                                   Subject<br>                                       [rt-users] I forgot how to do this
<br>             08/08/2007 02:40<br>             PM<br><br><br><br><br><br><br><br><br>I need to get a list of all of the values for one particular custom field.<br>I<br>had a script which did this after about a week or two of banging my head
<br>against<br>my desk.  However, I no longer have this script and am left banging my head<br>again as I've forgotten how to gather this list up.<br><br>I've tried using CustomFieldValue, CustomFieldValues, CustomField and
<br>CustomFields.  I can't for the life of me figure out how to do this.  Can<br>someone point me in the right direction?<br><br>--<br>Keep up with me and what I'm up to: <a href="http://theillien.blogspot.com">http://theillien.blogspot.com
</a><br>_______________________________________________<br><a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br><br>Community help: 
<a href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a><br>Commercial support: <a href="mailto:sales@bestpractical.com">sales@bestpractical.com</a><br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
<br>Buy a copy at <a href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a><br><br><br>_______________________________________________<br><a href="http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users">
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users</a><br><br>Community help: <a href="http://wiki.bestpractical.com">http://wiki.bestpractical.com</a><br>Commercial support: <a href="mailto:sales@bestpractical.com">
sales@bestpractical.com</a><br><br><br>Discover RT's hidden secrets with RT Essentials from O'Reilly Media.<br>Buy a copy at <a href="http://rtbook.bestpractical.com">http://rtbook.bestpractical.com</a><br></blockquote>
</div><br>