TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lynn Emery
NA
47
56.5k
Case Statement
Mar 11 2013 10:16 AM
Hi I am trying to add a virtual field via a substring, however I am having difficulties when trying to compare more the one substring.
For example
SELECT location, sales, Month, Year, CASE WHEN Substring([location], 1, 8) = '12345678' OR '24578914' THEN 'Location A' END AS Storage
FROM Sales
Does anyone know how to compare more than one substring value within a statement rather than creating a case for each.
Reply
Answers (
2
)
what is query
Stored Procedure for calculating total no of leaves