Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 17 Dec 2010 @ 17:06:57 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: How to query spl text
 
From:   Curley, David

Not sure about doing it in the database, but it's relatively easy to automate SHOW object.

You can run something like this in bteq to generate a separate text file for each object, then grep to list the files containing whatever you're looking for:

     .export file=runme.btq
     select x.txt (title '') from (
     select 1 stp, databasename, tablename, '.export file=' ||
     trim(databasename) || '.' || trim(tablename) || '.ddl' txt from dbc.Tables t
     where databasename in ()
       and tablekind = 'P'
     union
     select 2 stp, databasename, tablename, 'show ' || 'procedure ' ||
     trim(databasename) || '.' || tablename || ';'
     from dbc.Tables t
     where databasename in ()
       and tablekind = 'P'
     union
     select 3 stp, databasename, tablename, '.export reset'
     from dbc.Tables t
     where databasename in ()
       and tablekind  = 'P'
     ) x
     order by databasename, tablename, stp;
     .export reset
     .run file=runme.btq

Dave



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023