total count of rows in the vo.
Dear all,I have an af:showDetailItem in which I have an af:table. I want to show the total number of records in the header of af: showDetailItem.
example:
Employees (count = 10)
If someone has an idea how to fix this. ?
Kind regards
Sicard.
Component Version
================================================
ADF Business Components 11.1.1.59.23
Java(TM) Platform 1.6.0_21
Oracle IDE 11.1.1.4.37.59.23
Versioning Support 11.1.1.4.37.59.23
You can use estimatedRowCount on the binding of the tree.
Sample:
.
.
.
Jean Lou
Tags: Java
Similar Questions
-
How to display the total number of rows in the dashboard
Hello
I have a dashboard report for retrieving the list of projects and details, it grows on a daily basis, instead of users downloading the report and find out the total number of projects, I want to display 'the total number of projects' alone in the dashboard. How can I do?
Also is it possible to do like a pop up or something a little flash news - not necessary, but will be very good if I can do it.
Thanks for your time and your help.create a report and a column to write a column invert the function max (rcount (1)). Call this column depending on the position of the column (as @1) in narrative mode.
You can view only the narrative in the dashboard.for flash type of report, you can use the ticker view and call the same column in the view.
refer to this link to view the total number of records
http://Siebel.ITtoolbox.com/groups/technical-functional/Siebel-Analytics-l/display-row-count-in-top-of-the-table-view-3704999assign points if found useful.
-
total number of rows in the result
Hello..
I have a query_x with columns Col1, Col2, Col3 following and would like to get the total number of lines for my query_x so
-Query_x
SELECT
Col1,
Col2,
COL3
Of
X, Y, Z
WHERE
...=..
Group
Col1,
Col2,
COL3
ThanxSQL> select empno, ename , sal, count(*) over (order by null) total_rows from emp ; EMPNO ENAME SAL TOTAL_ROWS ---------- ---------- ---------- ---------- 7369 SMITH 800 14 7499 ALLEN 1600 14 7521 WARD 1250 14 7566 JONES 2975 14 7654 MARTIN 1250 14 7698 BLAKE 2850 14 7934 MILLER 1300 14 7788 SCOTT 3000 14 7839 KING 5000 14 7844 TURNER 1500 14 7876 ADAMS 1100 14 7900 JAMES 950 14 7902 FORD 3000 14 7782 CLARK 2450 14 14 rows selected.
HTH
SS -
Get the number of rows in the oracle table
Hi all
I want to get the total number of rows in the sql to the appmodule table.
After you apply the criteria to view some on the view object. If he try with getallrowsinrange the number of rows found within the viewobject was but I want a total number of rows in the sql table.
How can I get that
I use jdev 11.1.1.5
Thanks in advanceI threw something together, quick and dirty, don't hesitate to optimize.
Assuming you want the County table, I put the code in a subclass of EntityDefImpl since it is representing a table in the middle tier.
public class EmpDefImpl extends EntityDefImpl { /** * This is the default constructor (do not remove). */ public EmpDefImpl( ) {} //~ Methods **************************************************************************** public long getTableRowCount( DBTransaction transaction ) { String query = getQuery( ); String countQuery = String.format( "SELECT COUNT(*) FROM (%s)", query ); long count = 0; ViewObject vo = transaction.createViewObjectFromQueryStmt( countQuery ); try { vo.executeQuery( ); Row row = vo.first( ); Number number = (Number)row.getAttribute( 0 ); count = number.longValue( ); } finally { vo.remove( ); } return count; } }
Depending on your card type, you may not get an oracle.jbo.domain.Number, but something else, so the cast may need correction.
Usage example:
public class EmpEditViewImpl extends ViewObjectImpl { public EmpEditViewImpl() { } protected void executeQueryForCollection( Object object, Object[] object2, int i ) { super.executeQueryForCollection( object, object2, i ); EmpDefImpl def = ( EmpDefImpl )getEntityDef( 0 ); long tableRowCount = def.getTableRowCount( getDBTransaction() ) ); // Do something with it } }
As you can see, the code is fairly generic. Also, you might be able to put this in a base extension ADF class.
Sascha
Published by: Sascha Herrmann on June 7, 2012 14:39
-
BlackBerry Smartphones how do I totally have a row of s app on the home screen
Hi, I'm trying remove a line on the home screen of the app. Currently, there are two rows and I just want a. I did once but had to restore my phone to an older date because of a software problem. Now I don't remember how I got just a row of the app
While in the home screen, press the BB Menu key and select Options. This will give you access to Homescreen preferences. Under page Set Homescreen, put options, select 1 row.
That will put you to work.
-
total number of rows returned, how to learn it
Hello
I think that in Oracle should be some simple var which contains the number of rows returned, can someone help me with this.
I actually do it:
INSERT INTO TT_1 SELECT * FROM TT_2 WHERE COND_01.
Here so get the total number of rows populated without COUNT (*) extra.
TX
TRIf you want to see in PL/SQL you can do it like this:
SQL> set serveroutput on SQL> create table t1 as select * from all_tables where 1 = 0; Table created SQL> BEGIN 2 INSERT INTO t1 SELECT * FROM all_tables; 3 dbms_output.put_line('Rows inserted: ' || SQL%ROWCOUNT); 4 END; 5 / Rows inserted: 2238 PL/SQL procedure successfully completed SQL>
-
TKPROF output - lines processed / rows in the table anomaly?
Hello
TKPROF confusion for me more...
Oracle 10.2.0.4 on Windows Server 2003.
I formatted my Trace SQL with TKPROF file and the first query that I am focusing me causes some confusion. It's here (the names have been changed to protect the innocent, but everything remains intact):
What confuses me is that 'lines' (column 'lines' for the operation "Fetch" = * 260371 *, also 'lines' in the 'line Source operation' and "The execution Plan" = * 260371 *).******************************************************************************** SELECT A.COL1, A.COL2, MIN(A.COL3) AS COL_SYNONYM FROM OUR_TABLE A WHERE NVL(A.COL4, NVL(:B4 , -1)) = NVL(:B4 , NVL(A.COL4, -1)) AND NVL(A.COL5, NVL(:B3 , -1)) = NVL(:B3 , NVL(A.COL5, -1)) AND A.COL6 = NVL(:B2 , A.COL6) AND A.COL7 = NVL(:B1 , 1) GROUP BY A.COL1, A.COL2 ORDER BY A.COL1, A.COL2 call count cpu elapsed disk query current rows ------- ------ -------- ---------- ---------- ---------- ---------- ---------- Parse 1 0.00 0.00 0 0 0 0 Execute 83 0.01 0.01 0 0 0 0 Fetch 83 1.01 1.11 12 3154 0 260371 ------- ------ -------- ---------- ---------- ---------- ---------- ---------- total 167 1.03 1.13 12 3154 0 260371 Misses in library cache during parse: 0 Optimizer mode: ALL_ROWS Parsing user id: 148 (OUR_SCHEMA) (recursive depth: 2) Rows Row Source Operation ------- --------------------------------------------------- 260371 SORT GROUP BY (cr=3154 pr=12 pw=0 time=956798 us) 260371 CONCATENATION (cr=3154 pr=12 pw=0 time=1072560 us) 260371 FILTER (cr=3154 pr=12 pw=0 time=630121 us) 260371 TABLE ACCESS FULL OUR_TABLE (cr=3154 pr=12 pw=0 time=306867 us) 0 FILTER (cr=0 pr=0 pw=0 time=201 us) 0 TABLE ACCESS FULL OUR_TABLE (cr=0 pr=0 pw=0 time=0 us) Rows Execution Plan ------- --------------------------------------------------- 0 SELECT STATEMENT MODE: ALL_ROWS 260371 SORT (GROUP BY) 260371 CONCATENATION 260371 FILTER 260371 TABLE ACCESS MODE: ANALYZED (FULL) OF 'OUR_TABLE' (TABLE) 0 FILTER 0 TABLE ACCESS MODE: ANALYZED (FULL) OF 'OUR_TABLE' (TABLE) Elapsed times include waiting on following events: Event waited on Times Max. Wait Total Waited ---------------------------------------- Waited ---------- ------------ db file scattered read 2 0.01 0.02 ********************************************************************************
Actual number of rows in the table = * 3138 *.
I think that because we have performed 83 times, then the value of "lines" should be:
83 x number_of_rows_in_table = 83 x 3138 = * 260454 *.
What we have is 260371, who looks like me:
3137 = 83 x 83 x ( number_of_rows_in_table - 1 )
I misinterpreted the news (I guess I!)?
Why seems to be number_of_rows_in_table - 1 ? (Or is it pure coincidence?)
Kind regards
ADOSThat remains a record satisfied with the given list of a predicate in the WHERE clause?
If this isn't the case, then I don't see anything wrong here.
-
How to create ProcessModel calculate TOTAL as follows to call the file in the sequence?
I made a custom operator Interface and I want to support a progress bar for giving the user indicates to what extent this time they represent. I already have the infrastructure of reminder Setup so that the progress bar will be updated based on a Message from the user of the motor.
In the process template itself, I put in place a "ProcessModelPostStep" (the purple one) reminder so that after all the steps of the calling sequence file I increment an internal counter and send these data as well as the Message of the user.
The only missing part is to know how to calculate the TOTAL number of steps in the sequence file calling. I can get the total number of SEQUENCES defined in the calling file but I how to recursively on each sequence loop excluded from top down by counting all the steps of the sequence of the callee.
Appreciate any help in getting this last piece in place.
Thank you!
I have a better solution in the images below. The code snippet is the code called by TestStand to introduce recursion.
The attached code is the recursive call. It is similar to my first post, but the fixed a bug with the cast of references.
This should get the total number of step. The code works under some assumptions:
1. all called sequences are in the same file in sequence. (You can add steps to also get the path to the movie file and retrieves the sequence from there.)
2. There is no asynchronous LabVIEW step in TestStand. (These are treated as sequence calls into the API, and you must add code to sort.)
-
Sorting the rows in the table based on the first character - speed-problem
Hello
I have a text file with a lot of lines. The file is imported into LV, and must be sorted by the first character.
It works very well, but gets very slow lines if too.
If 40,000 lines then take 0. 2 s.
If 400,000 lines then the time rises with factor 100 in 25 years.
If 1,000,000 lines then the weather is dry 222 (~ 4 min)
Attached is the code which sorts a table to text.
The number of lines can be set with the meter of the loop (Loop-counter * 4 = NumberOfLines)
The elapsed time is displayed.
How to speed this up? (Or check the more linear time number of rows)
Thank you
You can try something like that. If you treat a table line by line, you end up taking a lot of time.
Sorry I have a problem of fixing of the VI.
-
Hi master,
I have a requirement. During the passage of a table, I need to get the number of rows in this table. Sometimes, when I spend 2 or more table names, I need to get the same count of result of lines. I got the below function. but it shows all the rows in the table. I want pariticular tabels only. How I can I get it.
Select table_name, num_rows from all_tables where table_name in ('EMP', 'Department'); I tried. I need to a procedure or function. who will pass the name of the table as a parameter and 1 or more than the name of a table if I pass, I need to display information from table name and number of lines.
CREATE OR REPLACE
TYPE t1_obj AS OBJECT)
table-name VARCHAR2 (30),
CNT NUMBER
)
/
CREATE OR REPLACE
TYPE t1_obj_tbl AS THE t1_obj TABLE
/
CREATE OR REPLACE
FUNCTION (f1)
p_schema_name VARCHAR2
)
RETURN t1_obj_tbl
PIPELINED
IS
v_retval t1_obj: = t1_obj (null, null);
BEGIN
FOR v_rec IN (SELECT table_name FROM dba_tables where owner = upper (p_schema_name) and nvl (iot_type, 'X')! = "IOT_OVERFLOW") LOOP
v_retval.table_name: = v_rec.table_name;
RUN IMMEDIATELY "SELECT COUNT (*) FROM" | p_schema_name | '.' || v_rec.table_name
IN v_retval.cnt;
PIPE ROW (v_retval);
END LOOP;
RETURN;
END;
Select * from table (f1 ('scott'));
The above function returns information from the table in SCOTT scheama. I need only perticular table info.
Please notify.
AR.
Hi Sven,
Front end people ask me the requirement. They wanted a proc or function as I want.
Please help me.
Concerning
AR
-
Total of a column when the check box is selected in table form
Hi all
Total of a column when the checkbox is enabled in the form of tables, but is not work, help
Tabular form - count Qty Checked
My credentials for my worksapce:
https://Apex.Oracle.com/pls/apex/
Workspace: GB
USERNAE: [email protected]
PASSWORD; GB
Thank you.
Kind regards
GB
Hi user13028844,
user13028844 wrote:
Please change your login username of "user13028844" to something meaningful. Reference: Video tutorial how to change username available
The second button is a javascript function call, which is not a summary. the javascript function has a problem
This function has the problem help me correct, whereas we can summarize the amount of lines checked
I have made changes to your page. Check the "Display of Javascript" button, now it shows the correct amount for active items.
Made the following changes:
- The following are removed from the section "run when Page Loads:
Declare p_qty number; p_total_qty number := 0 ; Begin for i in 1..APEX_APPLICATION.G_F01.COUNT LOOP select nvl(qty,0) qty into p_qty from DURATION where id = to_number(APEX_APPLICATION.G_F01(i)); p_total_qty := p_total_qty + p_qty; end loop; --htp.prn(p_total_qty); htp.prn(''); apex_application.g_print_success_message := 'Checked total qty:'||p_total_qty ; End;
NOTE: The section "run when Page Loads" is intended for JavaScript code to perform the loading of the Page and NOT PL/SQL code.
- The following code removed from the section "Header HTML":
This code was going nowhere, so removed and replaced with code below.
- Added the following code in the section "function and Global Variable declaration:
function enableButton() { // code goes here } function total_checked() { var total = 0; var qty = 0; $( 'input[name="f01"]' ).each(function() { if ( $(this).is(':checked') ){ qty = $(this).closest('tr').find('td[headers="quantity"]').text(); total += parseFloat(qty); } }); alert("Checked Total Quantity : " + total); }
Your APEX_ITEM. BOX calls a JS "enableButton" function, but it has no definition, dummy definition so added.
Kind regards
Kiran
-
Rows in the table LT until merger of all workspaces
Database 11.2.0.4
In our environment, we ran a few important updates in the workspaces and then merged these live workspaces. Up to 25% of the data has been updated in those workspaces. When these update batch workspaces have been created, previous workspaces exist who are not yet ready for the merger.
I noticed that the underlying tables of the LT now have about 25% more lines than the live view. We have now discovered that dbms_wm.refreshWorkspace works really poor. This statement is used to take seconds or minutes to the maximum, but can now take half an hour or more.
We recorded a support with Oracle request and provided details of the plan to see if we can get some resolution/advice explaining.
In the meantime, I have a question for the forum help my understanding of the works of the Manager of the workspace.
In the example below, I have table "wm_test_table", "test_workspace1" and "test_workspace2". In "test_workspace1", I update all rows in the table - the table LT now has 2 rows for each record. I merge 'test_workspace1' live and LT still has 2 rows for each record. The other lines are not removed until "test_workspace2" is merged and removed.
SQL> -- Create a test table SQL> create table wm_test_table ( 2 id integer primary key, 3 name varchar2(100)); Table created. SQL> -- Insert 1,000 rows SQL> insert into wm_test_table ( 2 select rownum, 'before' 3 from dual 4 connect by level <= 1000); 1000 rows created. SQL> commit; Commit complete. SQL> -- Version enable it SQL> execute dbms_wm.enableVersioning('wm_test_table'); PL/SQL procedure successfully completed. SQL> -- Create two workspaces SQL> execute dbms_wm.createWorkspace('test_workspace1'); PL/SQL procedure successfully completed. SQL> execute dbms_wm.createWorkspace('test_workspace2'); PL/SQL procedure successfully completed. SQL> -- Go to test_workspace1 and update all the rows SQL> execute dbms_wm.goToWorkspace('test_workspace1'); PL/SQL procedure successfully completed. SQL> update wm_test_table set name = 'after'; 1000 rows updated. SQL> commit; Commit complete. SQL> -- Check how many rows in wm_test_table_lt - we expect 2,000 as we haven't merged yet SQL> select count(*) from wm_test_table_lt; COUNT(*) ---------- 2000 SQL> -- Merge and remove test_workspace1 SQL> execute dbms_wm.goToWorkspace('LIVE'); PL/SQL procedure successfully completed. SQL> execute dbms_wm.mergeWorkspace('test_workspace1', remove_workspace=>true); PL/SQL procedure successfully completed. SQL> -- Check how many rows in wm_test_table_lt SQL> -- I'd hope there'd only be 1,000 but there is 2,000 SQL> select count(*) from wm_test_table_lt; COUNT(*) ---------- 2000 SQL> -- Let's see if compressWorkspace will get rid of them SQL> execute dbms_wm.compressWorkspace( - > workspace => 'LIVE', - > auto_commit => true, - > remove_latest_deleted_rows => true); PL/SQL procedure successfully completed. SQL> -- They're still there SQL> select count(*) from wm_test_table_lt; COUNT(*) ---------- 2000 SQL> -- Now merge test_workspace2 SQL> execute dbms_wm.mergeWorkspace('test_workspace2', remove_workspace=>true); PL/SQL procedure successfully completed. SQL> -- and the additional 1,000 rows are removed SQL> select count(*) from wm_test_table_lt; COUNT(*) ---------- 1000
Is it possible to safely remove the extra lines in LT without waiting until we merged the workspaces that existed before the update batch has been done? I hope that it will so improve the performance of refreshWorkspace.
I thought that something like this can do, but it does not remove the other ranks, is:
execute dbms_wm.PurgeTable( table_id => 'test.wm_test_table', archive_table => null, where_clause => 'id not in (select id from test.wm_test_table)', instant=>null, workspace => 'LIVE', purgeAfter => false);
This question is similar to
Lines left in the table LT after removal of the direct workspace and the removal of all workspaces
and
but I'm still not sure.
Thank you
John
Hello
This behavior is expected and it is due to the test_workspace2 workspace. A compression operation will not allow compressed range to include a backup implicit point that is created for a child workspace. This is done to preserve the integrity of this workspace. The initial 1000 lines are all lines that are visible from test_workspace2. Removal of these lines would leave test_workspace2 will 0 lines in there. Lines 1000 updates are the lines that do not appear on LIVE. So, given that the two sets of lines are needed, none of the lines can be deleted physically. A compression operation will never change the view of data for any workspace. It only removes the unnecessary records. The two options in order to be able to compress these lines is to either delete (as you did) or refresh test_workspace2. The refresh operation would move the implicit savepoint for the workspace to a version that isn't after all 2000 lines in the table _LT and allow the dressing to remove first half of them because they are no longer needed by any child workspace.
With respect to the performance of RefreshWorkspace, I would need to see a trace of the transaction file. But who should rather get through the SR you filed.
Kind regards
Ben
-
Hi all
We use the Oracle 10 g R2 64 bits on 64-bit windows server 2008.
I have the following tables
CREATE TABLE dept ( DEPARTMENT_ID NUMBER primary key, DEPARTMENT_NAME VARCHAR2(100) NOT NULL, DEPARTMENT_TYPE CHAR(1) NOT NULL, /* S for section, D for DEPARTMENT*/ REFERENCE_DEPARTMENT NUMBER/* Self reference to department_id */ ); alter table dept add constraint fk_dept_id_reference_dept foreign key REFERENCE_DEPARTMENT references dept(department_id); insert into dept values (1,'ETC','D',Null); insert into dept values (2,'CSS','S',1); insert into dept values (3,'ESS','S',1); commit; create table emp ( empno number primary key, ename varchar2(1000), department_id number references dept(department_id) ); insert into emp values (1,'Jones',1); insert into emp values (2,'Smith',2); insert into emp values (3,'Scott',3); commit;
Now we need a query that selects all employees, in each Department and the name of the service
We use the following query
select count(e.empno) Total_Employees,d.department_name from emp e, dept d where e.department_id=d.department_id;
The result shows as well the section names, while we want to display a result as below
Total_Employees Department_Name 3 ETC
We do not want to display the names of section, of course we want to count employees in all sections of a Ministry, or we only want to display the name of the Department.
I hope I'm clear in the description of my problem.
Thank you.
Hello
Maahjoor wrote:
I have 14 departments and nearly 25 sections.
I can't just include every department as HE said in HIS application
- Select department_id 1, "ETC." DEPARTMENT_NAME 'd' DEPARTMENT_TYPE, Null...
I have many ministries and numerous sections.
If I include all services as IT were included in the above sentence, my request will become 2-3 hundreds of lines.
IT should use only the names of actual columns in your query, not the service name, for example ETC.
concerning
No, the length of the query is the same, regardless of the number of rows in the tables. As Etbin explained in response to #8, emp and dept subqueries are not part of the solution; they are just average Etbin of testing the solution without creating any actual table. Since you have real tables, you can start with the following subquery solution, i.e.:
WITH the_data as
(select d.department_id, d.department_name, d.department_type, d.reference_department, c.emp_count
by d Dept.
...
-
What is the difference between count (1) selection of the tab and select count (*) tab;
994122 wrote:
Hello
SQL > set timing on
SQL > select count (*) of the emp
2 where deptno = 30;
COUNT (*)
---------------
6
Elapsed time: 00:00:00.01
SQL > select count (1) of the emp
2 * where deptno = 30
SQL > /.
COUNT (1)
-------------
6
Elapsed time: 00:00:00.01
See that both give the same time
Do you really think the 100th's of a second it takes 6 rows from counting will truly representative of the difference it takes actually?
Such a small data set cannot possibly show no difference to these larger units of time (in the calculation of terms where we have millions of instructions per second in lieu)
As the link to the FAQ provided in the response of Anton (first response on this thread) Watch, count (1) and count (*) are essentially the same, except that count (1) actually get re-written by the query re - write the step of the optimization to make it count (*).
Generally 'count (*)' makes more sense language, because it reads like "count" while "count (1)" reads as "count we ', which does not have as much good sense when you actually count all.
-
New rows in the table jumped in the tab order. LiveCycle ss4
Hello
I built a form with a few tables (all in subforms flowed) each of which has an action to add a new instance of the row if the last cell is not empty. I have done this before in other forms and had no problem, but for some reason any in this shape when I have the tab of the cell and it adds a new line, he puts the cursor in the field after the table, the new line to jump. My tab order is set to auto, so I don't know why there is not tab in the new line.
I found some discussions about what is happening in 8 Designer, but they were resolved by using subforms flowed and assuring that the subform global went (check!) or automatic tab order (check!).
Any help would be appreciated!
Personally I don't really like the way he behaves, but if that's what you really want. You can use the following code for the output of the last field of the line event...
TextField3::exit - (JavaScript, client)
If (this.parent.index == _Row1.count - 1 & this.rawValue == null) {}
_Row1.removeInstance (this.parent.index);
} ElseIf (this.parent.parent.resolveNode ("Row1 [" + (_Row1.count - 1) + "" "]". "+ this.name") .rawValue!) = null) {}
_Row1.addInstance (1);
}
Otherwise, if you do not, I suggest you have a subform/cell within the table with one (+ /-) button to add / remove lines
It's easier to use
cmdDel::click - (JavaScript, client)
If (_Row1.count > Row1.occur.min) {}
_Row1.removeInstance (this.parent.index);
}
cmdAdd::click - (JavaScript, client)
_Row1.addInstance (1);
Maybe you are looking for
-
Hello Skype for Windows 8 metro does not work on my HP DV7 running Windows 8. Strangely, it works on my HP DV9000 with exactly the same system and account. Whenever I open Skype metro on my DV7 it takes 3 minutes to come with the message: "there was
-
LVRTE 2012 installation refuses due to higher versions
LVRTE 2012 install refuses due to higher versions already installed See attachment
-
notebook became slow as soon as I connected my laptop
OK, this is something new, I have been facing since yesterday, I noticed that my computer laptop lenovo G460 has become slow when I connect my 320 gig laptop HARD drive, it's a seagate freeagent go... when I connect it and open the laptop drive on my
-
This question has been previously published, but doesn't seem to have not been resolved for my case. I have hired McAfee and they ran through their bag of tricks does not. The upgrade of Vista 64 Ultimate 64 Windowns fails due to McAfee Personal Fire
-
Windows 7 does not recognize iPhone
Hello I have a new laptop running Windows 7 64 bit. After I installed iTunes, when I plug my first gen iPhone, it triggers iTunes to open, but causes iTunes to freeze immediately. If I open iTunes and then connect the iPhone, same thing - iTunes a