Solved

testing  and updating column data in sql server 2005 table

Posted on 2011-09-06
2
260 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
2 Comments
 
LVL 23

Accepted Solution

by:
wdosanjos earned 500 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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