#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    29
    Rep Power
    0

    Unhappy Newbie Select Problem...


    Dear all,

    I am a newbie in Oracle, I now having a problem, that is, I have a table of some students, in which there is a column showing their gender (char(1)), and the data inside are 'f' or 'm'.

    Now the question is, I want to display it when it is 'f', it show me 'female', when it is 'm', it show me 'male'...

    I really wonder if it is possible to do so... I modified the gender column to varchar2(10) so that it can let me display more than one characters, but I still don't know how to display it as female or male.

    Thank you very much

  2. #2
  3. SQL Consultant
    Devshed Supreme Being (6500+ posts)

    Join Date
    Feb 2003
    Location
    Toronto Canada
    Posts
    27,026
    Rep Power
    4210
    see your documentation for the DECODE function


    rudy
    http://r937.com/
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    29
    Rep Power
    0
    Dear r937,

    Thank you so much for you instant reply!! I now understand how to do.

    ^^

IMN logo majestic logo threadwatch logo seochat tools logo