Du skal inkludere parameteren to gange i USING-sætningen:
OPEN emp_cv FOR sql_stmt USING my_job, my_job;
Her er dit eksempel, men forenklet:
DECLARE
TYPE EmpCurTyp IS REF CURSOR;
emp_cv EmpCurTyp;
emp_rec varchar2(10);
sql_stmt VARCHAR2(200);
my_job VARCHAR2(15) := 'X';
BEGIN
OPEN emp_cv FOR 'select * from dual where dummy = :j or dummy = :j'
USING my_job, my_job;
LOOP
FETCH emp_cv INTO emp_rec;
EXIT WHEN emp_cv%NOTFOUND;
END LOOP;
CLOSE emp_cv;
END;