EI_ES URR_ROLES URR_ROLES_TEXT
ES_ID ROLE_ID ROLE_ID
For each ES_ID in the EI_ES table, I would Like to create an entry in the URR_ROLES table
After this part,I would like to create an entry in the URR_ROLES_TEXT table, With the URR_ROLE'S ROLE_ID and EI_ES NAME. but When I do this, Its creating the ROle_ID for all the records in the EI_ES table.
select count(*) from EI_ES into a;
for i in 1..a loop
p_roles_id :=Sequence (Iam getting)+1
inserting into URR_ROLES ( ) values ();
inserting into URR_ROLES_TEXT () () from EI_ES;
URR_ROLES (ROLE_ID) EI_ES(NAME)
but its inserting like in URR_ROLES_TEXT table
2 def, Where as i want it to insert like
Every one is saying that to write a crusor,
What Am i supposed to do, Please any Help would be great.