CodePudding user response:
I think, two ideas, you can try to see not1. Every time I return to 30 rows, this to use SQL statements to implement, essentially a top, a combination of oracle rownum implementation, a combination of the SQL statement writing, you can search pages, and many examples of web language paging, open look, don't look at the web statements, seek the inside of the SQL statement, a lot of, one of the http://hi.baidu.com/156544632/blog/item/10c982b4966c91778ad4b25e.html
2. Direct retrieve () out all of the data, and then the filter (), use this method to data window inside the SQL statement to add a column, such as oracle database can add rownum as seq (essentially a I don't know), the row is another serial number, after you first retrieve can use setfilter (" seq & lt;=30 ") and then the filter and the second can use setfilter (seq & gt; "" 30 and seq & lt;=60 "), then the filter (), it is ok to construct an expression for the future oneself
Hope useful to you, don't understand the use of pb function F1, other can surf the Internet query directly
CodePudding user response:
If you use PB11, make a B/S, it's too easy to implement, to support data window itself, as long as one set at compile time shows the number of rows per page for 30 canIf you want to should be attached to the leadership, suggest you all data retrieved (add a null columns alias row_num) as a select statement, and then set the row_num with a loop lines,
Reoccupy setfilter setting conditions to show the display of data, such as display page 5, can setfilter (" row_num & gt; 150 and row_num & lt; Can be
=180 ")
If you really do good things, you need to retrieve data as required, oracle can fulfill your requirements with rownum
If want to return before 5 records:
Select * from tablename where rownum<6; (or rownum & lt;=5 or rownum!
=6)
If want to return to 5-9 record:
Select * from tablename
The where...
And rownum<10
Minus
Select * from tablename
The where...
And rownum<5
The order by name
Choose the results with the name after the show as a result, (first choose again)
Note: can only use the above symbol (& lt; , & lt;=,!=),
Select * from tablename where rownum!=10; Returns the first nine records,
Can't use: & gt; , & gt;==, Between... And, because the rownum is a pseudo column is always starting from 1, Oracle don't think this kind of condition, less than records.
In addition, this method is faster:
Select * from (
Select rownum r, from a yourtable
Where rownum & lt;=20
The order by name)
Where r & gt; 10
So take out 11-20 of records! (first to choose again sorted again)
The number of rows in the query results in the oracle database using the pseudo column ROWNUM said (starting at 1), but the ROWNUM is after query sort assignment before, so the query the employee birthday by 100-120 records should be wrote:
Java code
Select * from (
The select my_table. *, rownum as my_rownum from (
Select the name, birthday from the employee order by birthday
) my_table where rownum & lt; 120
) where my_rownum & gt;=100
Select * from (
The select my_table. *, rownum as my_rownum from (
Select the name, birthday from the employee order by birthday
) my_table where rownum & lt; 120
) where my_rownum & gt;=100
In addition to record the number of pages algorithm should be:
Page=(rowCounts + pageSize - 1)/pageSize.
You can refer to
http://hi.baidu.com/aztack/blog/item/d842686079012a40ebf8f8f9.html
http://rdc.taobao.com/blog/dba/html/67_oracle_fenye.html
CodePudding user response:
A. make the Datawindow each page shows a fixed line- the first step: add a computed column, the computed column must be in the Detail section, the input Expression: between (getrow ()/30) & lt; - 30 can also use the global function to replace here, so we can allow the user to any set print how many rows per page,
- step 2: define grouping, select menu Rows - & gt; The Create Group...
Group, according to the calculated column fields, and certainly will check box - & gt; New Page On Group Break selected,
- the third step: will the computed columns set as invisible,
CodePudding user response: