Home > database >  Stored in the process of how to take the cursor data inserted into a table
Stored in the process of how to take the cursor data inserted into a table

Time:10-03

DECLARE

Id3 NUMBER;

The BEGIN
For cur in (select aa. Id from RMDG. Dhr_stid aa) loop - take id address information
Recursive - up for level 3 address
Select id into id3 from (select * from RMDG. Addr
Start with id=cur. Id
Connect by the prior parentid=id) where grade=3;
- will address and recursive find 3 insert new table
Insert into RMDG. Dhr_stid_pp3 (id67, id3) values (cur. Id, id3);
commit;
END LOOP;
The END;

For help: the process of how to write
Address table addr, is a recursive table, looking for level 6, 7 up always find level 3,

Now need to batch to find a level 7 address of level 3,

How do I write?

CodePudding user response:

Your statement now, what's the problem?
  • Related