Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 23 Jan 2004 @ 08:51:08 GMT


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


Subj:   Re: Environment variable and Stored procedure
 
From:   Martin Reimann

Try something like that, don't generate BTEQs on the fly:

/* PROCEDURE can be compiled after filling out the  ... with Queryman like it is.

   But the logon_user1 needs permspace*/
REPLACE PROCEDURE logon_user1.test_proc(ods_table VARCHAR(61))
BEGIN

CALL DBC.SysExecSQL
('
 INSERT INTO '||:ods_table||' SELECT ... FROM ...
 WHERE field=''xyz''
 ');

INSERT into db_abc.PROC_LOG
VALUES (current_timestamp(0), 'INS', :ACTIVITY_COUNT,:ods_table,'');

END;


     
  <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