Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
tshaw20832
Starting Member
10 Posts |
Posted - 2014-05-08 : 16:06:04
|
ExampleI want to compare 12345 with abc-12345-1-1111-a and see if the first value is in the second.Thank you |
|
James K
Master Smack Fu Yak Hacker
3873 Posts |
Posted - 2014-05-08 : 16:09:37
|
[code]SELECT CASE WHEN 'abc-12345-1-1111-a' LIKE '%12345%' THEN 'Yes' ELSE 'No' END[/code] |
|
|
tshaw20832
Starting Member
10 Posts |
Posted - 2014-05-08 : 16:12:04
|
quote: Originally posted by James K
SELECT CASE WHEN 'abc-12345-1-1111-a' LIKE '%12345%' THEN 'Yes' ELSE 'No' END
Thank you very much |
|
|
|
|
|