Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 01 Mar 2010 @ 16:59:37 GMT


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


Subj:   Re: Regarding Dynamically collecting the Stats
 
From:   Mohommod.Khan

In side your For Loop, I am assuming you are using some sorts of Cursor then you need to set your messages as follows:

     FOR LOOPVAR  AS CUR1  CURSOR FOR
     DO
     SET PCG_MSG4='COLLECT STATISTICS ON ' ||LoopVar.PCG_MSG1||'.'||LoopVar.PCG_MSG2|| '
     INDEX (' || LoopVar.PCG_MSG3|| ') ' ;

     CALL DBC.SYSEXECSQL (:PCG_MSG4 ) ;

If you still have problem, I suggest you break the messages and run as Select so that you can see what is the end result of your SQL. This way we can troubleshoot better. Let me know if this worked.


Thanks



     
  <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