简体   繁体   中英

How do I find a certain value across all tables and columns in SQL Server

I have a hospital database from Philips, but the hospital I work at doesn't have the funding to get them to help me find where data in the application lives in the backend SQL Server database. The schema documentation isn't well done. I need to build a query to find the data but I don't yet know where the data lives.

I'm looking for a highly unique value that will tell me the column where most of the data I need is one I find it.

I'd really not like to pull in all of the greater than 100 tables into Access or Filemaker to try to figure out where the data lives.

Is there an easier method where you can query an entire database, and it will search for a certain value in all columns, across all tables to tell you which table and column that bit of data lives?

I'd also be ok with a software solution like Business Objects that might be able to do something like this (not that I know if Business Objects has that ability... I just know that it can help you find data in a database a little earlier so far).

So does anyone know the best approach to accomplishing this?

Try using ApexSQL Search . It's a free SSMS add-in that should help you find what you need without writing excessive queries.

If you have a way of finding/reporting the data in the frontend application, you could try using SQL Profiler as you retrieve the data in the application. Likewise you can run profiler when you save the data to see how it is written.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM