Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 08 Feb 2006 @ 19:36:28 GMT


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


Subj:   Re: Optimizer won't use PPI
 
From:   francois

You can try this example :

     REPLACE PROCEDURE PPI_USE()
     BEGIN

     DECLARE DATE1 CHAR(10);
     DECLARE DATE2
     CHAR(10);



     SELECT TKDT FROM VOLATILE_TABLE1 INTO :DATE1;
     SELECT TKDT FROM VOLATILE_TABLE2 INTO :DATE2;

     CALL DBC.SYSEXECSQL
     ('
     INSERT DUMMY_TABLE
     select * from really_big_table
     WHERE table_date BETWEEN '||''''||:DATE1 ||''''||' AND '||''''||:DATE2
     ||''''||';
     ');
     END

regards,

Francois



     
  <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