• Not trusting sp_depends or information_schema.routines when they get updated I took the idea of the first code and wrote a queries to scan syscomments Still need to clean it up but here is the first pass.

    --gets the list of the table.column that are used in a sp

    select o.name+'.'+sc.name

    from sys.objects o

    join sys.columns sc

    on sc.object_id = o.object_id

    join syscomments c

    on 1 = 1 --don't want to join

    where charindex (' '+o.name , c.text)> 0 --not sure if the space is needed.

    and charindex (sc.name , c.text)> 0

    and c.id = object_id('stored procedure name')

    and o.type = 'u' --might what this to be o.type in ('u','p')

    group by o.name, sc.name

    order by 1 ;

    FYI, sorry about not putting the [] on the object_id columns but it runs fine and who ever made the columns a reserved name should be

    Thanks for posting the original.