1、ORA-06512只是告诉你在PL/SQL code中,问题所在的行数,格式:ORA-06512:at str line num
2、ORA-01422:返回的行数比指定的多!
ORA-01422: exact fetch returns more than requested number of rows
Cause: More rows were returned from an exact fetch than specified.
Action: Rewrite the query to return fewer rows or specify more rows in the exact fetch.
第二条sql的返回值不唯一!
2、ORA-01422:返回的行数比指定的多!
ORA-01422: exact fetch returns more than requested number of rows
Cause: More rows were returned from an exact fetch than specified.
Action: Rewrite the query to return fewer rows or specify more rows in the exact fetch.
第二条sql的返回值不唯一!
要么使用游标,要么再限定死条件使只返回一行,就看你的意图了.
修改如下:
strsq2 := 'select '||v_ywlzd||' from t_a where jgdm='||to_char(vv_jgdm)||' and hzny='||to_char(v_date_pre);
execute immediate strsql2 into v_pre_month;