Count the Number of Rows in Data form
Hi,
I want to count the number of rows in a data form.In my form there is a large number of rows.Is there any way to count it.
Thanks.
If you are on 11.1.2.x then you could look at adding a formula and using the CountA function - http://download.oracle.com/docs/cd/E17236_01/epm.1112/hp_admin/apcs03s06.html
Otherwise it would be possible using custom javascript which you would have to had some experience in using.
Cheers
John
http://john-goodwin.blogspot.com/
Similar Messages
-
How to determine the number of rows of data in a datatable?
I have a datatable that I fill from an SQL query. I do not know exactly how many rows of data it will return (due to my selection criteria) but will be somewhere between 100 and 300 rows. I send this data into a report but need to determine the length of the report (panel height data member) programatically based on how much data the query has returned. So, I need a way to count how many rows are filled in the data table.
I tried doing a nested "if" statement checking the value of each cell but when I tested the expression at 59 "if" statements (will need 300+) I got a parser error in lookout when I tried to accept the connection. I also tried a type of loop by assigning cursor.2 either to its own value (circular) or to its own value plus one depending on the value of the cell at cursor.2. It was close but overshot by one row or more (much more sometimes).
Any clever ideas? Perhaps I have just been looking at this problem too long. Thanks, in advance, for your help.Since the datatable gets the data from the SQL query, you can also use the SQL statement to count the number of rows in the query result.
For example, in datatable you do "select localtime, trace1 from intdata where xxx". You can get the count by "select count(trace1) from intdata where xxx". Use the same condition in order to get the same number of rows.
Maybe another SQLExec object is needed to do the count.
Whenever the datatable executes the SQL, the SQLExec executes and return the count.
Ryan Shi
National Instruments -
How to count the number or rows in file
Hi Experts,
I am file as source and Oracle as target. My file containing the some data which is going to load to the target.
My requirement is that I want to count the number of rows which my file contains. Please help me how to count the total number of rows in file.
Thx,
Sahadeva.Hi,
You won't give a name DEST_USER_NAME:ODI will get these information.
it is important Command on source and Command on Source side .
-Pls write jython code on Command on Source side
-And Command On Target side Choose technology as Oracle and set logical schema to HR_logical
Sorry my mistake.İt is related jython syntax.Here is code:
import java.lang as lang
import java.sql as sql
import java.lang.String
import os
lang.Class.forName("<%=snpRef.getInfo("DEST_JAVA_DRIVER")%>")
cons=sql.DriverManager.getConnection("<%=snpRef.getInfo("DEST_JAVA_URL")%>", "<%=snpRef.getInfo("DEST_USER_NAME")%>", "<%=snpRef.getInfo("DEST_PASS")%>")
dblinks= cons.createStatement()
file1=open('EMP.txt','r')
count=0
line=file1.readline()
while line !='':
count+=1
line=file1.readline()
file1.close()
sqlQuery = "insert into HR.ETL_FILE_LOG (FILE_COUNT) values (count)"
rqQuery= dblinks.execute(sqlDBLink)
cons.close()
Regards -
How to count the number of rows in a cube!!??
Experts,
I can somebody tell me how do I count the number of rows in my cube when i am using listcube???..
Thanks
AshwinHi,
have a look ath this theard too
Number of Records in Cube
regards -
How to count the number of rows in a resultser object?
hi there
how to count the number of rows in a resultser object which may contains millions of rows? besides using a while loop? thanksYou don't, you execute a query whose result is the record count of those records that match the search and then you execute the actual query to create your record set. Typically you do
select count(id) from YourTable where [filter]
from the resulting ResultSet do
int res.getInt(1);
which gives you the count and then
select id from YourTable where [filter]
to produce the actual result set.
in the second query the id part can be substituted with the actual fields you want. -
Count the number of rows in a workbook.
Hi Experts , I have a requirement to count the number of rows in a WorkBook.Will it be possible to do this by creating a KeyFigure?Or are there any options in BEx to count and display the number of Rows.Many thanks for all your help.
Hi
In the query create a calculated key figure called 'Count' and put a formula as =1, then use this count where ever applicable..you can very well count the no. of rec.
with this.
Hope this helps..
assign points if useful..
Cheers,
Pattan. -
Count the number of rows resulting from a select statement
Hi,
Is there any way of counting the number of rows resulting from a select statement. i.e I have a select distinct statement and I then want to perform an IF statement on the number of rows resulting from the select statement.
Any help appreciated
Thanks
GaryDeclare
var1 number;
Begin
select count(distinct column_name) into
var1 from table_name;
If var1 > x Then
End IF;
End;
Hope I understood the problem correctly
null -
Count the number of rows inserted
Hi,
Is there a way to count the number of rows processed post DML in PL/SQL?
For eg,
BEGIN
INSERT INTO TMP1
SELECT * FROM EMP;
a function to count the number of rows inserted into tmp1SQL> set serveroutput on;
SQL> begin
2 insert into tmp1 select * from emp;
3 dbms_output.put_line(SQL%ROWCOUNT||' rows inserted');
4 end;
5 /
15 rows inserted
PL/SQL procedure successfully completed. -
How to count the number of Rows to be Updated before Update takes place..
Hi all,
I have a requirement, where i have to count the number of rows to be updated before updating it. SQL%ROWCOUNT gives the no. of rows updated ( after update takes place). How do i get to know the count of no. of rows to be updated/inserted/ deleted. I was looking for a simple solution, as above SQL%Rowcount. But i couldn't find any. I can use a Function and Return the value which will give me number of rows to be updated, But is there any Simple Logic other than this.. or any count function. Your Help is Appreciated. Thanks!If you really want to do this (I have no clue why you would need it), then you can piggy back on any existing pessimistic locking you may already have in place.
However, it would require two loops through the records of which you want to know the count before you update, and a second pass to update them.
I would really re-think the need for this, though.
SQL> create table t0304(c number);
Table created.
SQL> insert into t0304 select rownum from all_objects where rownum <= 10;
10 rows created.
SQL> commit;
Commit complete.
SQL> select * from t0304;
C
1
2
3
4
5
6
7
8
9
10
10 rows selected.
SQL> declare
2 cursor mycursor is select * from t0304 where mod(c,2) = 0 for update;
3 i number := 0;
4 begin
5 for r in mycursor loop
6 i := i + 1;
7 end loop;
8 dbms_output.put_line(i);
9 for r in mycursor loop
10 update t0304 set c = c + 20 where current of mycursor;
11 end loop;
12 end;
13 /
5
PL/SQL procedure successfully completed.
SQL> commit;
Commit complete.
SQL> select * from t0304;
C
1
22
3
24
5
26
7
28
9
30
10 rows selected.
SQL>Edited by: Steve Howard on Mar 4, 2011 5:57 PM -
Count the number of rows in an array
Hi there,
I'm quite new with Labview, maybe somebody can help me.
I have a .vi that controls two pump with certain ratios (to make a composition gradient). I export the data to an ascii file, which write the displacement of the two pumps in 2 colums. However, the number of rows is related to the ms-counter, and thus related to the processor of the computer. Now I need, at the end of the vi, to get the number of rows written to the ascii file, to do some further calculations. Does anybody know how to do this?!
ThanksYou could wire the loop-counter to a variable outside the loop, so you can see the number of iterations (don't forget to add 1).
You also can use the Array Size-Function. Here you get different outputs, according to the dimensions of the array to get the size of.
Here you can see what you get if you use this function:
1D-Array: one value
2D-Array: array, item 0 = number of rows, item 1 = number of columns
3D-Array: array, item 0 = number of pages, item 1 = number of rows, item 2 = number of columns
So if (in your case) you wire a 2D-Array you can use the array-size function, select item 0 of the array you get and you get the number of rows.
You can also have a look at the attachement.
Hope it helps.
Thomas
Using LV8.0
Don't be afraid to rate a good answer...
Attachments:
ArraySize.vi 17 KB -
Can I "count" the number of rows excluding the header and footers
I have some tables that consist of a different number of rows, as the number is part of an equation I need to know the number of rows excluding the header and footers. I have the work around in =ROWS(ColumnG)-3, but is there a tidier way? I want to be able to add footers (or headers) too and not have these counted.
Many thanks
LeeHi Lee,
Add a column to your table (for purposes of this discussion, the new column is placed before column C, and becomes the new column C). enter the formula below in all regular cells, but NOT in header or footer cells:
=1
Use the formula below, placed anywhere (except in a regular cell in column C) to get the number of non-header, non-footer cells:
=COUNT($C)
The first formula will automatically be placed in cells added to column C, and the results will change to reflect the added rows.
Regards,
Barry -
Want to count the number of rows of analysis item in WAD Template
HI all,
Detail Description:
In my WAD report, i have a Export to Excel Option. But I want when I click on this button, one pop up will come only if no of rows of the Analysis Item is Greater than 10,000 ask for Do you want to proceed or not.
Means 1st i want to count the no of rows in the Analysis Item, after that it will check, if the no of rows is greater that 10,000. then the pop up will come.
Question:
Does anyone know, "how to count the no of rows of the analysis Item ?" . It will be better if you know you to implement this with the help of java script.
Means there must be some varible, which counts the no of rows. If you know then please help meHi,
Please find the below link which helps you to get solution of your question.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0bbb20f-2d7e-2e10-258f-8655daa41fab?QuickLink=index&overridelayout=true
It is mainly used to automate queries, web templates, and reports in different output formats like PDF, Excel,
XML, XHTML, and HTML
How to see WAD reports on browser:
The BEx Web Application Designer is a desktop application for creating Web applications with BW-specific contents. Using the BEx Web Application Designer, you can create an HTML page that contains contents such as various tables, charts or maps. This HTML page (Web application) provides the basis for not only Web applications with complex interaction, but also for Web cockpits and iViews.
http://help.sap.com/saphelp_nw04/helpdata/en/1a/456a3badc1b315e10000000a114084/content.htm
Web Application Designer for Beginners
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/749a4622-0a01-0010-36bf-b6b30a2a3a22
Web Application Solutions: A Designer's Guide
http://www.lukew.com/resources/webapplicationsolutions.pdf
http://sap.ittoolbox.com/groups/technical-functional/sap-solution-manager/bw-web-application-designer-1955944
Feautures of WAD in 7.0
http://help.sap.com/saphelp_nw70/helpdata/en/88/4d354277dcb26be10000000a155106/frameset.htm
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/5c46376d-0601-0010-83bf-c4f5f140e3d6
Regards
Sudheer -
Count the number of rows based on the values!!!
Hi all,
What I am using:
I am working with a multidimensional database in Visual Studio 2010 using its Data source view and calculation member and dimension usage.
What I want to do:
I have a fact table that has five columns(leg(s),hand(s), Head and body,overall) that shows the category of how severe the injury is. Let say for the records all columns never have an empty value(no injury is stated with 'No injury' ) . These five columns
are connected with a dimension that has all the available values (Category A-E of injury).The overall has the most severe from the other four columns. I want to create a bar chart with five different measure
values, one for each column, and count the values in those columns.
For example : I have a slicer in the excel and a bar chart and the slicer has all the values of the Category of the injury ( Cat a,Cat B, Cat C, ... Cat E, No injury ) and when i select one of them, lets say
Cat C, the bar chart should update and show how many Cat C each measurement column has.
Example FACT table:
ID LEG HAND HEAD BODY OVERALL
1 No A No No A
2 No D C C C
3 E C D A A
4 E E B C B
So if i selected C the bar chart will count (Leg = 0, Hand = 1, Head = 1, body = 2 and Overall = 1).
Any ideas ?
Thanks for the help and the time :)Hi DBtheoN,
According to your description, you want to create a chart on excel worksheet to count the rows based on the value, right? If in this case, I am afraid this issue is related to Office forum, I am not the expert of Office, you can post the issue on the corresponding
forum.
However, this requirement can be done easily on SQL Server Reporting Services. You can using the expression below to count the rows.
=COUNT(IIF(Fields!LEG.Value=Parameters!TYPE.Value,1,NOTHING))
Regards,
Charlie Liao
TechNet Community Support -
Hi,
For the different log on dates for user , I want to calculate the number of times user has logged on i.e. count for (0calmonth) in the report .
Is this possible ?
Please let me know.
Thanks & Regards,
JeetuHI Jeetu,
Check this doc................
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/009819ab-c96e-2910-bbb2-c85f7bdec04a
Regards,
Vijay. -
I have a JSP page that access to a JAVA class, where I connect with the MySQL data base, and where I make some consults.
Hi, I need to knows how many rows I get from a SELECT consult.
I have this class to do:
package connectDB;
import java.lang.*;
import java.sql.*;
public class MyConnection{
Connection dbconn;
ResultSet results;
PreparedStatement sql;
public MyConnection()
try
Class.forName("org.gjt.mm.mysql.Driver");
try
dbconn = DriverManager.getConnection("jdbc:mysql://localhost/MyDataBase?user=USER&password=PASSWORD");
}catch (SQLException s)
System.out.println("SQL Error<br>");
}catch (ClassNotFoundException err)
System.out.println("Class loading error");
public int getDescribFile()
int number=0;
try
String consulta = "SELECT id_user, name_file, date_file, length_file FROM File_user";
sql = dbconn.prepareStatement(consulta);
results = sql.executeQuery();
/* HERE I�M TRYING TO COUNT HAOW MANY ROWS ARE THERE*/
boolean fr = results.absolute(1);
number = results.getResultRowCount() ;
}catch (SQLException s)
System.out.println("SQL Error<br>");
return number;
}How can I do ??
ThanksHi, I have done wath you say and I have been able to do this
In th JSP page
String StringFiles[][] = myConnection.getDescribFile();
In the Java class
public String[][] getDescribFile(){
int numberRows=0;
try{
String consulta = "SELECT count(id_file) as numero FROM File_user where id_file>0";
sql = dbconn.prepareStatement(consulta);
results = sql.executeQuery();
numberRows = results.getInt("numero");
}catch (SQLException s)
System.out.println("SQL Error<br>");
String cadReturn[][] = new String[numberRows][4];
try
String consulta = "SELECT id_user, name_file, date_file, length_file FROM File_user";
sql = dbconn.prepareStatement(consulta);
results = sql.executeQuery();
for(int i=0;i<numberRows;i++)
results.next();
cadReturn[0] = results.getString("id_user");
cadReturn[i][1] = results.getString("name_file");
cadReturn[i][2] = results.getString("date_file");
cadReturn[i][3] = results.getString("length_file");
}catch (SQLException s)
System.out.println("SQL Error<br>");
return cadReturn;
Thanks
Maybe you are looking for
-
A few problems with new Pearl 3G 9105
Device info Carrier: 02 Model info and OS version earl 3G, 9105 Apps and free space: 125.6MB free (1.5GB free in Media Card) Did a battery pull fix your issue? no Apps installed and their version if possible. No Apps installed Hello, I recently purc
-
Hello! I have a JFrame that contains some components I would rather didn't shrink below a minimum size, which I have specified using setMinimumSize. Everything works fine if I have te following line in my code: JFrame.setDefaultLookAndFeelDec
-
TF255186: The following SQL Server Reporting Services Instance could not be found
Hi, I'm trying to install TFS 2013 on a remote SQL RS instance. Using the TFS 2103 U4 installation SQL 2012 RS, name instance, Server: SQLProdA, Instance Name COMRS When I enabled tracing using debugView I see the following output: [4160] [Error @1
-
How to activate evaluation version of SQL server
How to activate evaluation version of SQL server 2012 with open license. in the VLS portal it is saying no product key is require. but my problem is i already installed evaluation version of SQL server 2012 and configure many things to it. after that
-
Converting java classes to an XSD, is there a tool?
Or do I have to do this by hand. I was talking to someone who teaches this enterprise/webservice stuff and he said something to the effect that jaxb can convert my java classes to .xsd files, i don't see how this is possible (I see the other way, fro