Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Fri, 29 Mar 2013 @ 20:09:39 GMT

  <Prev Next>   <<First <Prev

Subj:   Re: Parameterized column selection
From:   Anomy Anom

<-- Anonymously Posted: Friday, March 29, 2013 13:54 -->

You can do something like this:

     .EXPORT DATA FILE=sqltmp;
     SELECT 'INSERT into table1 SELECT col1, col2, col3,'||col_nm||' from table2;'
     (CHAR(1024)) from pilot_table where table_nm = 'table1'; .EXPORT RESET; .RUN FILE=sqltmp;

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