Solved

replace with a select statment

Posted on 2013-11-15
3
234 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

746 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now