finding unused variables in Stored Procedures

  • Intriguing question.

    Sorry though, no help. Will try find a way though.

    Crispin

    Why don't you try practicing random acts of intelligence and senseless acts of self-control?

    Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!

  • The only thing I can think of is writing a RegEx to run against the script. Would be beyond my regex capability, but I am sure it could be done. Or you could write some custom search code.

    Tim C.

    //Will write code for food


    Tim C //Will code for food

  • Beyond me as well. Trying brute force, you could grab the script for each proc, then iterate through and comment out one line containing a declare, then try to run the alter. If it fails, uncomment, otherwise leave it alone. Even as a force technique I think it would go pretty quickly.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

Viewing 3 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply