I have a region in oracle apex to which the data is getting from an pl/sql.
The following is the pl/sql source:
begin for drow in ( select * from books where book_id = :P13_BooK_ID ) loop htp.prn('
'); end loop;end;/Now I would like to add two more details(principal,director) into this region which are in another table called school and I have a common column in these two tables books,school as books.l_key = school.k_key.
||' || to_char(drow.REPORTING_PERIOD, 'MM-DD-YYYY') || '
||' || drow.L_KEY || '
||' || drow.BooK_NAME || '
||' || drow.C_TYPE || '
||' || drow.E_COUNT || '
How can I add these two details in the above region and there are many common column names in both the tables so when I tried as:
for drow in ( select * from books b, school s where book_id = :P13_BooK_ID and books.l_key =school.k_key) loopit shows me error
ORA-06550: line 4, column 2: PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names ORA-06550: line 4, column 2: PL/SQL: Statement ignoredcan someone tell me how can I get these two details to add in the region. Thanks