Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> PL/SQL structure which enables selecting into and referencing by integers

PL/SQL structure which enables selecting into and referencing by integers

From: Victor Engmark <victor.engmark_at_cern.ch>
Date: Mon, 25 Oct 2004 13:22:07 +0200
Message-ID: <clinkv$239$1@sunnews.cern.ch>


Hello,

I am having a slight problem in being able to keep my PL/SQL readable: I have to select a single row from a table with more than 200 columns, and then print them in an HTML table (over several rows).

The first solution involved selecting into a table of VARCHAR2s, but then the "SELECT ... INTO ..." part became huge because I had to specify the the VARCHAR2 table with indexes, as in "SELECT a, b, ..., aaa, ... INTO l_cols(1), l_cols(2), ..., l_cols(200), ... This solution also created another problem: I reached some size boundary for the SELECT statement, so it had to be split into three parts to even execute.

The second (present) solution is to select everything into a %ROWTYPE variable, but I have not been able to find a simple way of extracting the column data:
- Data in records do not seem to accessible using numbered indexes

Any help would be greatly appreciated.

-- 
Victor Engmark
Received on Mon Oct 25 2004 - 06:22:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US