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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Searching Results!!

Author  Topic 

mikebird
Aged Yak Warrior

529 Posts

Posted - 2010-05-21 : 12:03:46
I have a handy searchalltables SP I found on here years ago, and it's my conduit for getting to know brand new databases rapidly.

I get columnName and columnValue as the results. 'How do i' or 'I forgot how to' use another search string to to columnValue to limit the output?

I could get under the hood and enhance the SP itself, but, as with any SP, what's the syntax for executing it and filtering it before it arrives on the results pane?

I tried this, but it doesn't work...

select distinct col1, col2
from (exec searchalltables 'xxx')
where col2 = 'xx'

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-05-21 : 12:45:46
You'll need to create a temp table and put the results of the stored procedure into that. Then you can filter the temp table.

CREATE TABLE #Temp ...

INSERT INTO #Temp (...)
EXEC ...

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -