Number of entries in each table
Hi,
I have a requirement to find the number of entries in each table in the system, how do I find this? If I have to goto each table & find out it is a tedious job. Do we have any standard report kind of thing to find out the number of entries in all the tables at a time....
Thanks,
Chandra
I do not think that there is a Std. SAP report for this. If you check there is a FM CATT_GET_TABLE_ENTRIES that actually gets the table entries. But this is called dynamically.
Hope this helps.
Regards,
Mani
Similar Messages
-
NUMBER OF RECORDS IN EACH TABLE???
Hi!
how can i find the number of records in each table in the database. the result should be like this
table_1 123
table_2 60
table_3 88
thanks!!
also if we want to see it only for a particular schema???You can get all the table names and schemas from ALL_TABLES table.
then you can stored that on a cursor,
then you can create a function where you use an execute_immediate to run the queries dinamically. with that you can run a COUNT for each TABLE
That's the idea give it a shot :)
Regards -
Hi
How to find the number of rows in each table of a database by just using a SQL query,
and should not use the data dictionary tables also... is there any way...??
Thanks
MJIt can be done in a single SQL like ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Linux: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
Elapsed: 00:00:00.00
satyaki>
satyaki>
satyaki>SELECT table_name,
2 DBMS_XMLGEN.getxmltype ('SELECT Count(*) c FROM ' || table_name).EXTRACT ('//text()').ge
tnumberval() tot_rows
3 FROM user_tables;
TABLE_NAME TOT_ROWS
QUESTIONTYPE 0
SRGROUPTABLE 1
ST_TEST 4
REGISTER 0
DEB_1 2
EMP1 0
6 rows selected.
Elapsed: 00:00:12.04Credit goes to Michael. ;)
Regards.
Satyaki De. -
To to number consecutively entries inside a table
Hello everybody,
I need to to number consecutively my entries inside a table like this:
Heading1
1.Entry one
2.Enty two
3.Enty three
My table in the template looks like that:
Heading 1
<?for-each-group:current-group();./ID?> Entry <?end for-each-group?>
How can I achieve thise result?
Thank you in advance for your reply!
Edited by: user8973846 on 10.06.2010 01:13You can use
<?for-each-group:current-group();./ID?> <?position()?> Entry <?end for-each-group?> -
Equal Number Of Entries For Each Group
Hi,
I have been working on the problem off and on for a couple of weeks. I posted a simplified version of the question earlier and got good answers but the problem was not in the answers but how I asked the question.
My issue is this: I have a large data set with many dimensions. One of those dimensions is line number. The way the data is enter if the value for line number is zero there is no entry for that line number. So say California has 40 line numbers and Alaska has 3. This layout will not work for a project we are doing. What we need it to have the same number of line entries for each dimensions. So California would have 140 line entries with zeros for the blank entries and Alaskia would also have 140 line entries with zeros for the blank entries.
I'm using Toad and Oracle 10Hi,
Sure, you can do that. Outer-join a table (or result set) that has 140 rows to your real table.
Here's an example of a sub-query that has 140 rows:
WITH cntr AS
SELECT LEVEL AS n
FROM dual
CONNECT BY LEVEL <= 140
) ...Later in the query, you can reference cntr as if it were a table. cntr.n will have the values 1, 2, 3, ..., 140.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data. Simplify the problem as much as possible. For example, instead of needing 140 rows (when the actual data has only 3 or 40), say you want 4 rows, and post data that has 1 or 3 rows. You can change the numbers easily after you understand the solution.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using. -
Number of Entries in Dimension Tables and Fact Tables
Hi all,
is there an easy way to check
- the number of entries in the dimension tables
- the number of entries in the fact table?
Thanks a lot
AlexHi Alex,
If u want to see the content of Dimension table and Fact table for a infocube then just right click on a particular info cube then select manage . Select coneten tab there , form there u can either select Fact table to see the fact table conten or Infocube content to see the Dimensiontable content.
Regards.. -
Count the number of rows in each table
I have a list of table names, how to I write a query to find out the row count of each table.
select table_name from all_tables a where owner='XXX' and num_row > 100
or
select table_name from all_tables a where owner='XXX' and sample_size > 100
doesn't quite work.
Why?
Thanks in advance,
Edited by: mpt_fz on Jan 12, 2010 12:06 PMWell, then another method learned from Michael ;)
scott@ORCL>
scott@ORCL>select * from v$version;
BANNER
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - Production
CORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 - Production
Elapsed: 00:00:00.14
scott@ORCL>
scott@ORCL>
scott@ORCL>select table_name,
2 DBMS_XMLGEN.getxmltype(
3 'select count(*) c from '||table_name
4 ).extract('//text()').getnumberval() tot_rows
5 from user_tables
6 where iot_type is null
7 or iot_type != 'IOT_OVERFLOW';
TABLE_NAME TOT_ROWS
A_TEST_TB_CASHFLOW 14
TEST_DUMMY 1
A_TEST_TB_CASHFLOW_N 1
TEST_CAST 1
DEPT 4
EMP 14
BONUS 0
SALGRADE 5
EMP_DETAILS 3
T_EMP 0
AUDIT_T 0
TABLE_NAME TOT_ROWS
C_C 4
TRAIN_DET 2
TEST_COM_IMP 2
TIME_P 1
PRI_UQ 4
TEST_CHK 0
ANSHUMANSAHAISGENIOUS 1
T 1
XEUROPE 2
D_D 8
PUBLICTRANSPORT 4
TABLE_NAME TOT_ROWS
XASIA 2
TF1 0
TEST_HH 14
TEST_SWAP 4
REVIVE_XML 3
XGMT 1
CUSTOMER_DET 1
FOURWHEELER 2
SPOOL_LOG 13
CITYTRANSPORT 8
T1 2
TABLE_NAME TOT_ROWS
T2 2
A_A 1
B_B 2
AUTOMOBILE 1
XDUAL 1
S_TEMP 0
39 rows selected.
Elapsed: 00:00:08.78
scott@ORCL>Regards.
Satyaki De. -
To number serially entries in a table
Hello everybody,
I have a table, where I group for the ID.
<?for-each-group:current-group();./ID?> Now I wont to number my table entries. So I use
<?for-each-group:current-group();./ID?> <?position()?> So far it works fine.
Then I exclude a group where id=discoun
<?if:ID!='discoun'?> The entry with the ID=discoun will be not shown in the report. But the number of the entry will
be omitted. So it can occur, that I get the following order:
1 reduction
2 additional charge
4 premium
My problem is, that the number 3 will be omitted. The entry premium should get the 3.
Does andybody know how could I face this problem?
Thanks in advance
Edited by: user8973846 on 17.06.2010 06:04It works fine for me, thank you very much for the quick answer.
I got a further requirements on the report.
In the same table I need to show just five rows per page in the report. If the are more then five rows in it table, the next fife rows
should appear on the next page. Do you know how could I solve this problem? -
How do I create a chart of the number of entries for each date?
I have a table which contains bookings for an event I am running, with one row for each booking and a column for the date of the booking. I am trying to create a line chart which shows me the progress of the number of bookings over time. So the X axis would have one label for each day of the month - even if there was no booking on that day, and the Y axis would have the number of bookings, i.e. the number of rows, matching the date.
I have tried a few things without success, so I wonder if someone could help with this?
Thanks,
NickThe top table is titled "Bookings" and the bottom table summariese the bookings by counting how many bookings fall on each day:
The bottom table:
B2=COUNTIF(Bookings :: $B, "="&A2)
select B2 and fill down as needed -
How to find out Number of entries in a Huge Table?
Hi,
I would like to know Number of entries in table DFKKOP. when i try to get it through se16, it takes more than 10 minutes in dialogue process so a time out occurs. is there any way to find out number of entries in the table Apart from creating a program for that?
Please guide me to the solution.
Thanks,
Lijo Joseph
Message was edited by: Lijo Joseph VazhappillyREPORT YCHATEST .
Data : begin of itab occurs 0.
include structure tab512.
data:end of itab.
data : v_count like sy-index,
tabname like X030L-TABNAME value 'DFKKOP'.
CALL FUNCTION 'RFC_GET_TABLE_ENTRIES'
EXPORTING
table_name = tabname
IMPORTING
NUMBER_OF_ENTRIES = v_count
tables
entries = itab.
write : v_count.
Message was edited by: Sekhar -
Create Store Procedure to Count Number of records in Database for each table
Hello,
I have created the code which counts the number of records for each table in database. However, I want create store procedure for this code this code that when ever use execute the Store Procedure can provide the database name to execute it and as a result
table will display number of records in each table.
Below you will find the code its working:
CREATE
TABLE #TEMPCOUNT
(TABLENAME
NVARCHAR(128),
RECORD_COUNT BIGINT)
-- Creating a TEMP table
EXEC
sp_msforeachtable
'insert #tempcount select ''?'', count(*) from ? with (nolock)'
SELECT
* FROM
#TEMPCOUNT
ORDER
BY TABLENAME
DROP
TABLE #TEMPCOUNT
This code need to be convert in store procedure and user can give database name when execute the procedure in order to count the records.
Looking forward for your support.
Thanks.
SharePoint_Consultant_EMEASomething like:
set quoted_identifier off
go
create procedure usp_TableCounts
@DBName as varchar(1000)
as
set nocount on
declare @SQLToExecute varchar(1000)
CREATE TABLE #TEMPCOUNT (TABLENAME NVARCHAR(128), RECORD_COUNT BIGINT) -- Creating a TEMP table
set @SQLToExecute = @DBName + ".dbo.sp_msforeachtable 'insert into #tempcount select ''?'', count(*) from ? with (nolock)'"
print @SQLToExecute
exec (@SQLToExecute)
SELECT * FROM #TEMPCOUNT
ORDER BY TABLENAME
DROP TABLE #TEMPCOUNT
GO
Satish Kartan www.sqlfood.com -
Hi,
I need to replace the existing email address domain with the new one [example: xxx(at the rate of)yyy.com to xxx(at the rate of)zzz.com] in ADR6 in two fields: SMTP_ADDR and SMTP_SRCH. There are huge number of entries in the table which apparently impossible to change manually in the SAP table ADR6 from SE11.
Is there any way to change (replace) that in any efficient way rather than changing each and every entry?
Is there any place, where I can make the change and it will reflect in the respective entries in the table?
Please share your ideas.
Thanks & Regards,
Sujit.hi guys ,
its very easy ,
go for se16 , fetch all the records which are required to delete ( use only se16 lay out)
after fetching the records just enter ' /H ' in the command bar
and then double click on any of the enter , then u fill go to debugging screeen and then just press F7
u will find the following code
form set_status_val tables ntab structure x031l
using code name next for_lines.
field-symbols: .
refresh exclude_tab.
if code = 'SHOW'.
set titlebar 'TAB' with name 'anzeigen'(100).
elseif code = 'EDIT'.
set titlebar 'TAB' with name 'ändern'(101).
elseif code = 'INSR'.
set titlebar 'TAB' with name 'einfügen'(102).
elseif code = 'ANVO'.
set titlebar 'TAB' with name 'einfügen'(102).
elseif code = 'DELE'.
then just click on CODE and pass value as DELE and press F8
AND THEN U CAN DELETE ALL THE ENTRIES -
Calculating no. of entries in a table
Hi experts,
How can i calculate the number of entries in the table vbak?
I will reward all the helpful answers.
Thanks,
Ajay.Ajay,
data : number(10) type n.
describe table itab lines number.
this will get you the no.of entries in the internal table itab.For a Standard table you can check in SE12 itself by clicking on the NUMBER OF ENTRIES button.
K.Kiran. -
Number of record with multi-table insert
Hi,
I need to insert into 3 different tables from one big source table so I decided to use multi-table insert. I could use three inserts statements but the source table is an external table and I would prefer not reading it three times.
I wonder if there is a way to get the exact number of records inserted in each one of the tables?
I tried using rowcount but I all I get is the number of rows inserted in all three tables. Is there a way to get this info without having to execute a "select count" in each table afterward?
Thanks
INSERT /*+ APPEND */
WHEN RES_ENS='PU' THEN
INTO TABLE1
VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
WHEN RES_ENS='PR' THEN
INTO TABLE2
VALUES(CD_ORGNS, UNO_ORGNS, DT_DEB, SYSDATE)
ELSE
INTO TABLE3
VALUES(CD_ORGNS, NO_ORGNS, DT_DEB, SYSDATE)
SELECT ES.CD_ORGNS CD_ORGNS, ES.RES_ENS RES_ENS, ES.DT_DEB DT_DEB, ES.NO_ORGNS NO_ORGNS
FROM ETABL_ENSGN_SUP ESI have a large number of data to load in those three tables. I do not want to use PL/SQL (with loops and lines of codes) because I can do the insert directly from the source table and it saves a lot of time.
INSERT /*+APPEND*/
WHEN condition1 THEN
INTO table1
WHEN condition2 THEN
INTO table2
SELECT xx FROM my_table
For example, if my_table has 750000000 rows, I only need to read it once and the INSERT..SELECT is a really fast way to load data.
As I was saying, the only problem I've got, is that I cannot get the number of rows in each table. Do you know a way to get it? -
Give me a way to count the number of entries in a Database Table
Hello All,
I am writing a code to determine the number of entries in a SAP/Custom table.
Can you please suggest a proper approach and a good query.
Thanks in advance.Hi,
If you want to do it in a more generic way you can do the following:
DATA: tblname(50),
tp_rows TYPE i.
tblname = 'MARA'.
SELECT COUNT(*)
FROM (tblname)
INTO tp_rows.
IF sy-subrc <> 0.
CLEAR tp_rows.
ENDIF.
At runtime the table is being determined and in this case it's set to MARA. The value of the number of rows is in the variable tp_rows.
Best regards,
Guido Koopmann
Maybe you are looking for
-
IPhoto Library open in mbpluginhost
Hi all, Just upgraded to the new OSX Yosemite (10.10.3) and when I open iPhoto I'm getting the error 'iPhoto is open in mbpluginhost' - what does this mean??
-
Hey, I'm trying to learn Swing applications and I've run into a bit of trouble positioning my "Hello World" label on the screen. I've created a JFrame that is 640x480 in size and I want to move my label to a specific x,y within the frame. I've tried
-
I'm recieving my new Mac Pro tomorrow. It will have LIon on it. I never used Lion, and would like to knowif my apps are universal applications will they run under Lion?
-
How do I read .rtf files on a Mac?
I have a bunch of rtf files, but my Mac can't read them. Is there a way to read them?
-
I have Logic Studio 8 installed on an OLD Mac Mini (10.6.8). It's not really worth the hassle to upgrade hardware (and the hardware that can be upgraded in that Mac Mini is limited). Am I entitled to the Logic Pro 9 upgrade to install on my brand n