Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query help 1

Status
Not open for further replies.

mikedaruke

Technical User
Mar 14, 2005
199
US
Hi, I have a col in a table that has numbers, 1 = Real, 2 = Fake, etc.

when I do the query, instead of it showing 1, 2 can it show Real, Fake?

How do you do that
 
Use a decode statment:

select decode(column, 1, 'Real', 2, 'Fake') from table
 
Thanks for the quick response. This is exactly what I needed. Thanks!
 
Mike said:
Thanks for the quick response. This is exactly what I needed. Thanks!
At this point, Mike, we Tek-Tipsters typically press the link, Thank Dagon for this valuable post to give Dagon a well-deserved
star.gif
. [2thumbsup]

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Dagon,

Since Mike seems to be Missing In Action, please accept a
star.gif
in his behalf, from me.

Cheers,

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I provide low-cost, remote Database Administration services: www.dasages.com]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top