Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 05 Jan 2006 @ 10:59:32 GMT


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


Subj:   Perl, DBD::ODBC and 'Show Table'.
 
From:   Hurford, Martin

To all Perl/Teradata gurus,

I have been attempting to retrieve table DDL via the ODBC DBD using the Perl DBI. Unfortunately with very poor results.

Issuing the 'show table' using the usual sql 'prepare' and 'execute' methods give me the following:

     e.g. 'UNIQUE PRIMARY INDEX ( Prod_Cd );Y-MM-DD')D',ET LATIN NOT
     CASESPECIFIC,C,L,'

Not that useful I'm sure you will agree.

I have tried using the 'dump_results' method with mixed by still useless results:

     ----------------------------------------------------------------
     e.g $sth->dump_results; (defaults to 35 characters output)
     returns
     'CREATE SET TABLE papo_data.pro...'
     1 rows
     ----------------------------------------------------------------
     $sth->dump_results(200); (use 200 characters as max output)
     returns
     Prod_Desc VARCHAR(255) CHARACTER...'ACK ,
     1 rows
     ----------------------------------------------------------------
     $sth->dump_results(10000); (use 10000 characters as max output)
     returns
     UNIQUE PRIMARY INDEX ( Prod_Cd );'-MM-DD')D',ET LATIN NOT
     CASESPECIFIC,C,L,
     1 rows
     ----------------------------------------------------------------

Plainly all the DDL is 'in there' somewhere but how do I get it out in a useable format?

ODBC is the chosen interface in this instance so please no recommendations to use the Teradata DBD or other DBDs or modules. Plus this is bugging me and I'd like to get a fix for it for my own personal satisfaction.


Your help is appreciated.

Martin.



     
  <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