Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    9

    Unanswered: different display

    guys

    this is my first post here, i am very new to SQL. I am trying to achieve this. my table A has a column called Flag which has values 0 or 1. I need to select that column but display the results as "Yes" or "No" based on the flag. How can acheive this feature in my select statement?

    Table A has column "flag"

    Basic Query: select flag from A; This displays a bunch of 0s and 1s. I need to see a bunch of "Yes"s and "No"s.

    Please reply..

    -Chinna

  2. #2
    Join Date
    Nov 2002
    Location
    Desk, slightly south of keyboard
    Posts
    697
    Hi Chinna,

    select decode(flag,1,'Yes',0,'No','Neither Yes or No') from tablea

    Hth
    Bill

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •