|  |  | 
|  |  | Archives of the TeradataForumMessage Posted: Mon, 27 Mar 2006 @ 23:58:56 GMT
 
 You can create an store procedure to drive such action as dropping a table as result of the search for another object. The query could be something like this : 
     Create procedure
     ...
     if
     Select 'Exist' where exists (select databaseid, tvmname from dbc.tvm
      where databaseid in (select distinct databaseid from dbc.dbase where
     databasename = :dbo)
      and tvmname = :tablename and tablekind = 'T')
     ...
     Then
     Database :dbo;
     Drop table :tablename;
     ...
You must have select access to dbc database This is just an approach, I hope this help. Regards Alejandro __________________________ 
 | ||||||||||||||||||||||||||||||||||||||||||||||
|  | ||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | ||||||||||||||||||||||||||||||||||||||||||||||||
|   | ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||