Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2002

    Unanswered: sql script for table statistics

    Does anyone have a SQL script (or some other solution) that can give you statistics on table column usage in stored procedures? For example, a tool that will show you how many times a certain column is joined, used in a where clause, the stored procedures that reference this column, etc?


  2. #2
    Join Date
    Jun 2002
    New York City
    if i understand your problem correctly, you are just trying to find where the fieldA is explicitly referenced throughout your database. Perhaps you need to change the name of the field?

    If this is the case, try this script. You should also grep (ie, search) your application for any occurence of the field name and change that, too:

    use MyDB

    select distinct(name) from syscomments c
    inner join sysobjects o on
    where c.text like '%passwordage%'

    Other system tables will give you explicit access to foreign keys references, etc... you should check it out...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts