Link to home
Start Free TrialLog in
Avatar of Newton
Newton

asked on

syscomments

hi
i am comparing the output of number of view from syscomments for specific tablename with sp_depends tablename output. i always get few extra views in syscomment output. is it correct way of comparing and why we get extra output from syscomments output.

1. select distinct sysobjects.name,
case
 when sysibjects.type = 'v'
..
  from sysobjects inner join syscomments on
sysobjects.id = syscomments.id
where syscomment.text like'%tablename'

2. sp_depends '%tablename%'

i am comparing above 2 output and find there is diffetence output..
ASKER CERTIFIED SOLUTION
Avatar of Joe Woodhouse
Joe Woodhouse

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Newton
Newton

ASKER

Thanks Joe. Noted.