0

I can find word and terms inside stored proc and database, but I can't specifically search for an expression like WHERE name LIKE '%005%'.

Is it possible to do that with the Redgate SQL Search plugin for SSMS?

I couldn't find anything that allows me to search for complex expressions.

0

1 Answer 1

1

You should refer to RedGate's product documentation on SQL Search for usage information, and specifically the wildcards docs which state:

Asterisk (*) wildcard

You can use * as a wildcard to match 0 or more characters, similar to a SQL LIKE clause.

For example, search for 'b*' to find all objects containing words beginning with b.

So in your case you'd want to use *005*. Also make sure you have "Use Wildcards" checked off in the SQL Search UI as well.

Note that RedGate SQL Search is likely querying the system catalog to satisfy the search that's entered, with a basic UI facing the end user. You could use T-SQL against the system catalog to emulate the same functionality and with the ability to do more complex filtering, for example sys.procedures to search for all procedures that contain a given name like so:

SELECT [name] --, add whatever other columns you need here
FROM sys.procedures
WHERE [name] LIKE '%005%'

Please see Querying the SQL Server System Catalog FAQ for more helpful information on using the system catalog.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.