
October 17th, 2004, 08:10 AM
|
|
Contributing User
|
|
Join Date: Sep 2003
Posts: 97
Time spent in forums: 2 h 23 m 19 sec
Reputation Power: 5
|
|
|
FROM emp SAMPLE (MYNUMBER)
Hello,
why does the following code work NOT with the line:
SAMPLE (mynumber )
Code:
CREATE OR REPLACE
PROCEDURE mysample
IS
mynumber NUMBER := 20;
BEGIN
DBMS_OUTPUT.PUT_LINE('mynumber: '||mynumber);
FOR r_samp IN (
SELECT SAL
FROM EMP
--SAMPLE ( 20 )
SAMPLE ( mynumber )
)
LOOP
DBMS_OUTPUT.PUT_LINE('sal: '||r_samp.SAL);
END LOOP;
DBMS_OUTPUT.PUT_LINE('mynumber: '||mynumber);
END mysample;
|