This seems pretty straightforward, but for some reason I'm not finding anything about how to do it. I'm using SQL Server Management Studio 2012, and I have a set of results returned from a SELECT query, say, select a,b from x
. How can I search in column b
for a substring? In Access I would click on the column and type Ctrl+F, but in SSMS that seems to only be used for searching the SQL itself, not the results. How can I search in my results? I know I can modify my query to only return that result, e.g.:
select a,b from x where b like '*hello*'
but I want to get all the rows returned, not just that one.
UPDATE: The responses I'm getting are about how to build a query that selects only the rows I'm looking for, which, as I specified above, is not what I'm looking for. I want all rows returned, and I want to look around in the search results in the SSMS interface to find the desired values. The reason is that I want to see these values in the context of other rows that don't have them.