Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 02 Apr 2003 @ 15:35:59 GMT


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


Subj:   Re: Show Command
 
From:   Jim Downey

Chris,

I created these instructions for someone doing a similar task:

In queryman

Select Tools-Options-check 'write all answer sets to a single file'

In queryman run this query

SEL   'SHOW TABLE '||
      TRIM(DATABASENAME)||'.'||
      TRIM(TABLENAME)||
      ';' AS XQL
FROM  DBC.TABLES
WHERE DATABASENAME = 'PCDW'
AND   TABLEKIND='T'
;

In queryman

Select File - export results

Paste the answerset from the first query above into the query window. You have to delete the first line which is the header 'XQL' Run the query.

When prompted for a file type in the name of the database, a space the word DDL a period then SQL. eg PCDW_AUTO@ DDL.SQL

Edit the file:

Remove 'Request Text' from the file.

The instructions would get you to the point where you have all the show table commands in a single place.

You would need to tweak the original query to get the output more like what you needed. For example, the XQL that is created writes a single show table statement for each row in the DBC that matches your criteria. Since you want to include other data, you would want to wrap this query with another one that builds the insert statements that you would need to insert the values into your target table.



     
  <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