|
|
Archives of the TeradataForum
Message Posted: Fri, 23 Jan 2004 @ 08:51:08 GMT
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;
| |