?
Solved

testing  and updating column data in sql server 2005 table

Posted on 2011-09-06
2
Medium Priority
?
266 Views
Last Modified: 2012-05-12
I have a table in a sql server 2005 database.

If Column A cell contains ">>" I want the corresponding cell in B to say Yes, else say No

I'm thinking something like;
IF '>>' IN (Column A)
SET Column B = 'Yes'
ELSE
SET Column B = 'No'
 yes

any help appreciated...thanks
0
Comment
Question by:blossompark
[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 Comments
 
LVL 23

Accepted Solution

by:
wdosanjos earned 2000 total points
ID: 36491304
Please try the following:

SET ColumnB = CASE WHEN ColumnA LIKE '%>>%' THEN  'Yes' ELSE 'No' END

I hope this helps.
0
 

Author Closing Comment

by:blossompark
ID: 36491381
Perfect!!  Thank you!! :)
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

752 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