RRinTetons
IS-IT--Management
I've got a script that I use to find the names of all tables that have a column named 'x', or 'x' and 'y', etc.
Once I've got that list I'd like to find the tables where the column 'x' has a specific value. Any thoughts on how to do that?
I'm thinking that I put the output of the part I know how to do into a table variable or a cte and then do something involving dynamic SQL, but I hate fiddling around with dynamic SQL, so I'm hoping there's another way to do it!
-
Richard Ray
DBA, Developer, Data Analyst
Jackson Hole Mountain Resort
Once I've got that list I'd like to find the tables where the column 'x' has a specific value. Any thoughts on how to do that?
I'm thinking that I put the output of the part I know how to do into a table variable or a cte and then do something involving dynamic SQL, but I hate fiddling around with dynamic SQL, so I'm hoping there's another way to do it!
-
Richard Ray
DBA, Developer, Data Analyst
Jackson Hole Mountain Resort