MySQL Forums
Forum List  »  Newbie

Replace Values by Select-Statement
Posted by: schwertfeger
Date: June 03, 2005 02:54AM

Hi,
i've on Table with people and one boolean for sex. I try to create one Querry, which replace or creates a new column, where instead of sex=true/false the string male/female can be read.

I tried with
SELECT DISTINCT name, REPLACE(sex, false, 'male') AS sex FROM ...

But the rest of the world is represented by 0 instead of 'female' and i can't access this new column.

Thanks,
BS

Options: ReplyQuote


Subject
Written By
Posted
Replace Values by Select-Statement
June 03, 2005 02:54AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.