possible to run SQL to find places where views are defined?

LabKey Support Forum (Inactive)
possible to run SQL to find places where views are defined? Ben Bimber  2010-09-30 07:23
Status: Closed
 
a large number of the EHR views have been switched to files. however, sometimes there were older views created in labkey of the same name. can SQL be run to find where those exist? something that just identifies all the places where a view has been defined in labkey would be good enough. if someone could point me to the right table(s) i might be able to figure out the rest.
 
 
jeckels responded:  2010-09-30 09:25
Hi Ben,

They're in query.customviews. You can run a query like this in pgAdmin to find the ones in the database and the folder they live in:

select cv.name as viewname, queryname, schema, c.name as containername from query.customview cv, core.containers c where cv.container = c.entityid