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

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieve N record from a large table...

Re: Retrieve N record from a large table...

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 03 Sep 1999 12:50:42 -0400
Message-ID: <EfzPNxe+xqnlWn66Pa46uidRXyO4@4ax.com>


A copy of this was sent to Jimmy <c6635500_at_comp.polyu.edu.hk> (if that email address didn't require changing) On Sat, 04 Sep 1999 00:28:47 -0700, you wrote:

>Hello Thomas,
>
>Thomas Kyte wrote:
>
>> what I did once upon a long time ago what this:
>>
>> created a dummy view with N columns in it. something like:
>>
>> create view dummy as select substr( 'x', 1, 2000 ) c1, substr( 'x', 1, 2000 )
>> c2, .... from dual;
>>
>> I built a default block on it. I made sure the default block referenced the
>> view dummy NOT schema.dummy.
>>
>
> Is the block contains fixed number of items? i.e. how can handle the table which
>contains more column fields than the block items?
>

*ALL* blocks have a fixed number of items.

I fixed the number of items at the total number (N) of columns I put in the dummy view. If you have the need -- put 1,000 columns in the view above (c1-c1000). Typically 100 or so will suit most needs. build the dummy view with as many columns as you feel appropriate.

>> At runtime, I would ask the user for the table name.
>> I would query the data dictionary for the list of columns.
>> I would use that to build a view (say they said "emp") like:
>>
>> create view dummy as select ename c1, to_char(empno) c2, ...., to_char(null),
>> c10, to_char(null) c11, ..... from emp;
>>
>> I would use forms_ddl to create the view.
>>
>> I would use forms builtins to hide the extra columns.
>>
>> I would go-block and execute query.
>>
>> I'm done -- forms does all of the scrolling for me. I don't have to do any
>> more.
>>
>> Might that work for you?
>>
>
>Thanks,
>Jimmy

--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Fri Sep 03 1999 - 11:50:42 CDT

Original text of this message

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