I am new in pl/sql programming and I need your help.
I would like to make a procedure. To be more specific, I have tables like the folowing TABLE1
|COL1 | COL2 | COL3 | COL4 | COL5 | COL6 |COL7|
For the same COL1 and COL2/COL3 , check the select different values from COL4
For instance for COL1=600 , COL2=140/COL3=2 and COL2=150/COL3=3
Return 20 and 35
And insert in this table TABLE1 the rows
600 , 150 , 3, 20 , 1400 , 340, 7 (seq number)
600 , 150 , 3, 35 , 1700 , 120, 8 (seq number)
I make inserts in Table1 if P_FLG1 = 'Y'. IF P_FLG2 = 'Y' I make inserts also in TABLE3 etc
I am trying to make the procedure like below but I can't finish it
PROCEDURE COPY_COLUMNS ( P_COL1 IN A.COL1%TYPE, P_FROM_COL2 IN B.COL2%TYPE, P_FROM_COL3 IN B.COL3%TYPE, P_TO_COL2 IN B.COL2%TYPE, P_TO_COL3 IN B.COL3%TYPE, P_FLG1 IN VARCHAR2, P_FLG2 ...