I'm not sure if this is a bug or a user failure, so I'm going to ask here before doing anything rash.
I'm trying to classify a single field using the IN() expression into two groups: IF(t2.status IN(2,3,4), "open", "closed") I'd like to GROUP those together so I can COUNT them. When I try SELECT IF(t2.status IN(2,3,4), "open", "closed") t2st FROM tasks t2 GROUP BY t2st I get an error. It occurs to me that this could be 1: A defect in the 3.23.57 version I'm using. I'm downloading 4.1.1a as we speak, to try it in that version. If this is so, can anyone who knows about these things tell me if this is supported in a later version, and if so which version? 2: More likely, it's a fault in my (limited) knowledge of SQL. Perhaps it is necessary to create a temporary table or do something more sinister to get a count of a computed field. If this is the case, can someone knowledgeable in SQL tell me how to go about it? I've got a fairly small data set to process (the "full" version of my query filters down the data) so I can do this outside SQL if I have to. But I wanted to push this onto SQL if I could. aTdHvAaNnKcSe =Austin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]