Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Jan 2008 @ 21:29:48 GMT


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


Subj:   Create a Table sourced from a complex view
 
From:   Anomy Anom

<-- Anonymously Posted: Tue, 22 Jan 2008 16:22 -->

Hi. Is the logical approach below do-able in the Teradata world?

Task: create a table that includes a subset of columns from a complex view.

One of the virtual columns in the view is formed by casting a few numbers that are then concatenated into a CHAR (20) attribute.

Trying the SQL below returns an (expected) error message that the complex view is not a table.

     explain

     create TABLE  db832.table1_xxx   /*** would like to use a subset of
     columns from complex_view ***/
     AS db832.complex_view
     WITH NO DATA
     ;

The CREATE TABLE AS fails; and the error message reports accurately that he complex-view is not a table.

Any way around this?

If it is possible to trick Teradata into accepting the view as the source for table creation, is it possible to select a subset of the columns for the table definition.

It is only Tuesday on a short week, so I am hopeful that something exists out there.


Thanks in advance your help.

Rgrds



     
  <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