Solved

replace with a select statment

Posted on 2013-11-15
3
239 Views
Last Modified: 2013-11-15
select column1 from table1

if column1='bob', write 'bob evans'
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 6

Accepted Solution

by:
Argenti earned 500 total points
ID: 39651039
Version 1:
select IF(column1='bob', 'bob evans', column1) as MyColumn
from table1

Open in new window


Version 2:
select case column1 when 'bob' then 'bob evans' else column1 end as MyColumn
from table1

Open in new window

0
 

Author Closing Comment

by:rgb192
ID: 39651058
Thanks for 2 answers case and if
0
 
LVL 6

Expert Comment

by:Argenti
ID: 39651271
You're welcome :)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question