Home > database >  Seek help from a great god, the problem in the code
Seek help from a great god, the problem in the code

Time:10-16

 CREATE OR REPLACE PROCEDURE test IN VARCHAR2 (x IN VARCHAR2, z) IS 
TYPE mycur IS REF CURSOR;
Cur mycur;
SQLS VARCHAR2 (4000) :='SELECT b, MIN (a) FROM a (SELECT regexp_replace (t.r ecord_id,' [^ 0-9] ") b, t.r ecord_id a FROM bl_record_sanction_ref t WHERE t.r eference_value IN (' | | x | |
')) GROUP BY b ';
A VARCHAR2 (30);
B VARCHAR2 (30);
Emp bl_record_address % ROWTYPE; How to parameterized - table name?
The BEGIN
The OPEN cur FOR SQLS;
LOOP
The FETCH cur
INTO b, a;
EXIT the WHEN cur % NOTFOUND;
DECLARE
CURSOR crs2 IS
SELECT * FROM bl_record_address WHERE record_id=a;
Emp bl_record_address % ROWTYPE;
The BEGIN
FOR y IN crs2
LOOP
Emp:=y;
An emp. Id:=seq_bl_record_address. Nextval; - call here the sequence of parameterized?
The emp. Record_id: z=| | '_' | | b;
An emp. List_name:=z;
INSERT INTO bl_record_address VALUES emp;
END LOOP;
END;
END LOOP;
END the test.

CodePudding user response:

Type emp1 is table of emp % rowtype; How to parameterized - table name?
V_emp1 emp1;
Should such?

CodePudding user response:

reference 1st floor yoyohey response:
type emp1 is table of emp % rowtype; How to parameterized - table name?
V_emp1 emp1;
Should such?
hello, is will be parameterized bl_record_address the name of the table,

CodePudding user response:

MoZhu reference 2/f, a cicada response:
Quote: refer to 1st floor yoyohey response:

Type emp1 is table of emp % rowtype; How to parameterized - table name?
V_emp1 emp1;
Should such?
hello, will bl_record_address the table name is parameterized,
you change the table not to go, please,,
  • Related