title: Oracle CURSOR%ROWTYPE common for many cursors having only some columns the same
body: <p>Good day, I have a couple of tables ITEMS_* that may have different columns but certain columns exists and are of the same type in all of them. An example: </p>
  
  <pre><code>CREATE TABLE "APT"."ITEMS_AV" (
      -- These columns are common for all tables
      "ID" NUMBER NOT NULL ENABLE, 
      "CODE" VARCHAR2(20) NOT NULL ENABLE,
      "DESCRIPTION" VARCHAR2(50) NOT NULL ENABLE,
      -- Other columns may differ
      ...,
      -- The primary key is the same in all tables
      CONSTRAINT "ITEMS_AV_PK" PRIMARY KEY ("ID")
  ) TABLESPACE "APT" ;
  </code></pre>
  
  <p>For each table I wrote a special PL/SQL procedure to process data in the table. There's a cursor 'cur' declared in each procedure:</p>
  
  <pre><code>CREATE OR REPLACE
  PROCEDURE PROCESS_ITEMS_AV AS
      CURSOR cur IS
          SELECT ID, CODE, DESCRIPTION, ...
          FROM ITEMS_AV;
  BEGIN
      FOREACH d IN cur LOOP
          FIX_DATA(d);
          -- Continue processing 'row' data
          ...
      END LOOP
  END PROCESS_ITEMS_AV;
  </code></pre>
  
  <p>Inside this procedure I need to call procedure FIX_DATA that fixes data in the current row. For example remove whitespaces from row.CODE and remove invalid characters from row.DESCRIPTION. Normally I'd declare this procedure for each single table as:</p>
  
  <pre><code>CREATE OR REPLACE 
  PROCEDURE FIX_DATA (r IN OUT ITEMS_AV%ROWTYPE) AS 
  BEGIN
      r.CODE := ...;
      r.DESCRIPTION := ...;
  END TESTPROC;
  </code></pre>
  
  <p>BUT this procedure does the same for all tables so I'd like to have just single procedure FIX_DATA which would be used in all PROCESS_ITEMS_* procedures. The problem is the table name in the declaration of parameter 'r':</p>
  
  <pre><code>PROCEDURE FIX_DATA (r IN OUT ITEMS_AV%ROWTYPE) AS ...
  </code></pre>
  
  <p>Is there a way how to declare the 'r' parameter so that I can use it for many cursors which have only some (but allways the same) columns identical?</p>
  
  <p>Many thanks in advance.
  Vojtech</p>