|
|
Archives of the TeradataForum
Message Posted: Wed, 08 Feb 2006 @ 19:36:28 GMT
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
| |