stored procedure checking

  • Is there a way that I can get all the where clauses in all my stored procedures?

  • If you're looking for a way to retrieve everything around your where clause that would be rather difficult since there's no way to know where it would end. You could take a stab at grabbing a certain number of characters after the where clause but that would undoubtedly give you extra or not enough data

    If you just want to know which stored procedures have where clauses you could do something like

    select * from syscomments c

    inner join sysobjects o on o.id = c.id

    where c.text like '%where%' and o.type = 'p'

    and then work through them.

    that's off the top of my head so it may not be exact

      

Viewing 2 posts - 1 through 1 (of 1 total)

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