I have a column that has varchar values, and need to find if the result of a query can be found anywhere in that column. For example the varchar column may have the following values:
- abc100
- 00100
- 100
- 200
and a select query may have the following results:
- 100
- 200
I need to return all values in the varchar column that have the value '100' or '200' any where in it. In this case all results in the varchar column should be returned.
This is what I currently have:
select varcharColumn from table where varcharColumn like (select query)
When I try this query I am getting the following error:
"The result of a scalar fullselect, SELECT INTO statement, or VALUES INTO statement is more than one row"
How can I get this query to return a list of the varchar column where any part of it contains a result of the select query?