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 2000 Forums
 SQL Server Development (2000)
 Writing a select query that select columns based on a where clause, across all tables in a database

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-05-23 : 00:20:19
David Abbishaw writes "Hi,

I'm looking for a way to search across all tables in
a database for fields containing a specific value.

For example instead of doing a select * from table where column like 'xyz', table needs to be all tables and column needs to be all columns within each table.

The only way I can thing of doing this is to use the system table that holds a reference to all other tables, and consectivly quering each one, but I've never made this work.

Hopefully you've finaly been stumped, I know I have been!

regards
David Abbishaw"
   

- Advertisement -