Maybe some of you had faced such kind of problem:
I have to out query results into html page.
Ok. It's more than simple using a cursor. BUT it becomes a problem, when tables have 100 or 200 or more columns.
I mean this:
cursor cur is
select * from table_name;
and after that
FETCH cur INTO cur_record;
EXIT WHEN cur%notfound;
HTP.P('columns: '||cur_record.col1||','||cur_record.col2||'....... .'||cur_record.col259||'...');
Becomes uncomfortable. And, I think, it should be possible to put into loop. But i cannot find a decision how to realize such thing like
The other decision could be
TYPE RES_ARRAY AS VARRAY (300) OF NUMBER;
SELECT * INTO RESULTS FROM table_name WHERE condition;
In that table are ONLY numbers.
BUT I receive an error
ORA-00932: inconsistent datatypes: expected UDT got NUMBER
As I understand, UDT is User Defined Type....... And all tutorials and Oracle documentations show only examples with UDT.