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.
| Author |
Topic |
|
AlanS
Starting Member
28 Posts |
Posted - 2005-07-06 : 09:45:48
|
| I have a database containing hundreds of tables and stored procedures. I need to automate the task of compiling a list of all the table fields which are not currently indexed AND meet any one or more of the following conditions:1. the field name ends in "ID"2. the field appears in the WHERE clause of any stored procedure3. the field appears in the GROUP BY clause of any stored procedureI believe all this information can be extracted from the system tables, but am not sure how to do so. Any suggestions, or links to existing scripts, would be greatly appreciated. |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2005-07-06 : 09:52:36
|
| look in BOL for INFORMATION_SCHEMAShould point you in the right direction*need more coffee*SELECT * FROM Users WHERE CLUE > 0(0 row(s) affected) |
 |
|
|
|
|
|