Solved

replace with a select statment

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

if column1='bob', write 'bob evans'
0
Comment
Question by:rgb192
  • 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

As a database administrator, you may need to audit your table(s) to determine whether the data types are optimal for your real-world data needs.  This Article is intended to be a resource for such a task. Preface The other day, I was involved …
Creating and Managing Databases with phpMyAdmin in cPanel.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

830 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