You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Compare: select * from INFORMATION_SCHEMA.SCHEMATA
With: select * from INFORMATION_SCHEMA.SCHEMATA s where exists (select top 1 1 from INFORMATION_SCHEMA.TABLES t where t.TABLE_SCHEMA = s.SCHEMA_NAME) or exists (select top 1 1 from INFORMATION_SCHEMA.VIEWS v where v.TABLE_SCHEMA = s.SCHEMA_NAME) or exists (select top 1 1 from INFORMATION_SCHEMA.ROUTINES r where r.SchemaUpper = s.SCHEMA_NAME)
The latter should be used.
The text was updated successfully, but these errors were encountered:
Actually, the issue in my case was that %SQL_MANAGER.ProceduresTree(0) lists schemas where subordinate items won't be suggested as tables. So fixing #33 for TVFs will fix this, and for the off chance that we have functions but no TVFs the impact is minimal.
Compare:
select * from INFORMATION_SCHEMA.SCHEMATA
With:
select * from INFORMATION_SCHEMA.SCHEMATA s where exists (select top 1 1 from INFORMATION_SCHEMA.TABLES t where t.TABLE_SCHEMA = s.SCHEMA_NAME) or exists (select top 1 1 from INFORMATION_SCHEMA.VIEWS v where v.TABLE_SCHEMA = s.SCHEMA_NAME) or exists (select top 1 1 from INFORMATION_SCHEMA.ROUTINES r where r.SchemaUpper = s.SCHEMA_NAME)
The latter should be used.
The text was updated successfully, but these errors were encountered: