Re: How do i search all Stored Procedures for a table name

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance





Select object_name(id) From syscomments where text like
'%tblContractHistory%'

weegee@xxxxxxxxxxxxxx wrote:
> What I want to do is to search within the text of all Stored Procedures
> ...for instances of a table name within the SQL
> statement
>
> Does anyone know how I would be able to do this?
>
> Say for example I want to search for the table tblContractHistory
>
> Would I use sysobjects?

.



Relevant Pages

  • How do i search all Stored Procedures for a table name
    ... What I want to do is to search within the text of all Stored Procedures ... ....for instances of a table name within the SQL ... Would I use sysobjects? ... Prev by Date: ...
    (microsoft.public.sqlserver)
  • Re: Help
    ... I don't think you need to join from sysobjects just try ... select object_name,* from syscomments where ctext like '%order by ... > declare @tbnames varchar ... > fetch next from test into @tbnames ...
    (microsoft.public.sqlserver.server)
  • Re: Encrypted Stored Proc
    ... The problem with using syscomments is that some larger stored procedures ... > with encryption ... > declare @objname sysname ...
    (microsoft.public.sqlserver.programming)
  • Re: Estimate disk space required for my DB
    ... The biggest size will always be the data, stored procedures and function ... definitions are mainly held in the syscomments tables. ... > I want to estimate the disk size required at my deployment ...
    (microsoft.public.sqlserver.server)
  • RE: Fetching SQL Server object text
    ... The sysobjects table contains the list of stored procedures and functions, ... Is there a way programmatically to fetch the source text for these? ... like to have code that fetches the source code for each so that I can ...
    (microsoft.public.sqlserver.server)