|
Archives of the TeradataForumMessage Posted: Tue, 10 Nov 2009 @ 08:03:29 GMT
Hi, One way of getting the list is: SELECT databasename, tablename FROM dbc.tables WHERE tablekind='V' AND requesttext LIKE '%tablename%'; Remember this will even pick the tables 1) that are commented in the view definition. 2) those names are part of other tablename/columnname/keyword or anything written in the view definition(for eg. table "EMP" also searches views that refer "EMP_DETAIL" table OR "EMP_ID" column.) Better use requesttext LIKE ('%tablename %') OR requesttext LIKE '%tablename,%') ie. with space OR comma added at the end of search pattern If you qualify your tables with databasenames in your view definition, the above scenarios can be avoided. requesttext LIKE 'databasename.tablename%'; which is generally not recommended in multi environment applications (dev, qa and prod servers) thanks & regards, Murali D.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||