On 3/21/02 11:55 AM Tyler Clendenin wrote:

> say i have a table of users. and i want to select their gender, but the gender
> is stored as numbers 1 and 2 but i want to output them as M or F
> 
> SELECT FunctionIDontKnow(Gender, 1, 'M', 2, 'F') AS GenderAbbr
> FROM Users

In SQL 7 at least:

SELECT genderabbr = case when (gender = 1) then 'M' else 'F' end
>From users

- Sean

~~~~~~~~~~~~~~~~~~~~~~~~~~
Sean Daniels
  Director, Engineering
  Marketplace Technologies, Inc
    (T): 207.363.7374
    (C): 207.332.6340
    (F): 240.269.6319
~~~~~~~~~~~~~~~~~~~~~~~~~~
  http://www.dealforce.com
  http://www.mergernetwork.com



______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to