How do I find a table name in a stored procedure\view in snowflake with snowsql?
The SQL statement in SQL Sever equivalent is:
select distinct
[Table Name] = o.Name, [Found In] = sp.Name, sp.type_desc
from
sys.objects o
inner join
sys.sql_expression_dependencies sd on o.object_id = sd.referenced_id
inner join
sys.objects sp on sd.referencing_id = sp.object_id
and sp.type in ('P', 'FN')
where
o.name = 'YourTableName'
order by
sp.Name
INFORMATION_SCHEMA
. @FelipeHoffa - I believe the question is asking how to find stored procedures that reference a particular table. – Mike Walton