Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 20 May 2009 @ 15:53:11 GMT


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


Subj:   Re: Create Statement in Macro
 
From:   Michael Larkins

Hanumath:

Since you are trying to CREATE TABLE and INSERT, the INSERT is causing your error. In a macro DDL has to be the last statement of the transaction and you are placing a DML statement.

To get around this situation you can use the CREATE volatile TABLE new_name AS SELECT. This way the CREATE is the last statement of the macro/transaction. Don't forget to include your WITH DATA and ON COMMIT PRESERVE ROWS.


Regards,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <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