Re: How to know if a table exist in a Stored Procedure?



Hari:

Thanks for your quick help.

Best regards from Argentina,

--
Jorge L. Cotarelo

"Hari Prasad" <hari_prasad_k@xxxxxxxxxxx> escribió en el mensaje
news:uhJ87V00GHA.4972@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

use dbname
go
Select object_name(id) from syscomments where text like '%table_name%'

Replace table_name with actual table name.

Thanks
Hari
SQL Server MVP


"Grupo ESI" <Pedir@xxxxxxxxxxxxxxx> wrote in message
news:eRsvJT00GHA.720@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

Can anybody please tell me How to know if a table exist in a Stored
Procedure?

Thanks in advance,

--
Jorge L. Cotarelo


.



Relevant Pages


Loading