DECLARE
v_column VARCHAR2 (20);
v_value VARCHAR2 (20);
CURSOR c_columns
IS
SELECT Column_Name_To_Count
FROM Table_Name
WHERE Condition
ORDER BY ROWNUM;
TYPE column_rec IS RECORD (column_name VARCHAR2 (30));
TYPE columns_table IS TABLE OF column_rec;
t_columns columns_table;
BEGIN
OPEN c_columns;
FETCH c_columns
BULK COLLECT INTO t_columns;
CLOSE c_columns;
HTP.p ('<br/>');
HTP.p ('<table><tbody>');
FOR i IN 1 .. t_columns.COUNT
LOOP
HTP.p ('<tr>');
HTP.p (
'<td><label for="P42_C'
|| LPAD (i, 3, 0)
|| '" id="P42_C'
|| LPAD (i, 3, 0)
|| '_LABEL">'
|| t_columns (i).column_name
|| ' :           '
|| '</label></td>');
HTP.p (
'<td>'
|| APEX_ITEM.TEXT (1, p_item_id => 'P42_C' || LPAD (i, 3, 0))
|| '</td>');
HTP.p ('</tr>');
END LOOP;
HTP.p ('</tbody></table>');
EXCEPTION
WHEN OTHERS
THEN
IF c_columns%ISOPEN
THEN
CLOSE c_columns;
END IF;
END;
Muhammad Abdul Qaium is a Database Engineer/Oracle Apex Developer/BI Developer (in Atlanta, USA) who is an Oracle Certified Cloud Architect Professional, OCI Autonomous DB specialist as well as Oracle Business Intelligence Foundation Suite 11g Certified Implementation Specialist with extensive expertise in Database design , PL/SQL, Oracle Apex, Microsoft SSIS, ETL, Power BI, Qlik Sense, OBIEE. Contact: qaiuminfo@gmail.com
Search This Blog
Subscribe to:
Post Comments (Atom)
Check Difference Between Two Database Objects
Step-1. Create Two DBLINK to connect with Two Database then Step-2. define logindb= DBLINKONE define remotedb= DBLINKTWO define schema_name=...
-
Search by keyword from Oracle Database Objects. select owner, type, name, line, text from dba_source where 1 = 1 and text like '%TEXT Y...
-
We Can Export Application Components individually from Oracle Apex. Application > Shared Components > Export Application Compo...
No comments:
Post a Comment