ora 1007的问题求教 定义游标如下: declare a_cur cursor for select a1,a2,a3,a4,a5,a6,a7,a8,a9 from (select t.*,rownum rn from table where a0=:a0and rownum<=to_number(:lastrow) ) where rn>=to_number(:firstrow);
fetch a_cur into :a1,:a2,:a3,:a4,:a5,:a6,:a7,:a8,:a9
还是你个数不匹配造成的,好好检查一下。以下是官方解释 ORA-01007: variable not in select list Cause: A reference was made to a variable not listed in the SELECT clause. In OCI, this can occur if the number passed for the position parameter is less than one or greater than the number of variables in the SELECT clause in any of the following calls: DESCRIBE, NAME, or DEFINE. In SQL*Forms or SQL*Report, specifying more variables in an INTO clause than in the SELECT clause also causes this error. Action: Determine which of the problems listed caused the problem and take appropriate action.