I’m trying to conduct a SQL statement. I would like to include a LIKE clause. But instead of applying the clause to the entire string I would only like it to compare a portion of the string
For example I have this string:
CS00324522 | test1 / random text1
And from this I need to construct a WHERE statement that would find this:
CS00324522 | test1 / random text2
The | and / characters are common to all strings in the database. However the length of the strings between each of the characters varies with each row.
I guess I need to extract everything to the left of the | characters so the SQL looks like
Where row1 LIKE CS00324522 |
Any ideas if this could be achieved?