on 2006 Jan 09 7:23 AM
Hi all,
I know that we can count the no. of entries with
SY-DBCNT,
but besides this, can I directly use sql statement, e.g. select count...
to count the no. of entries?
Thanks.
Hi Macy,
Yes you can use the SQL statement and it is the advised methid to find the count of the records.
Thanks
Lakshman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can:
Select count(*)
from table
where ....
Check the sy-dbcnt.
Regards,
Maria João Rocha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Macy,
We can use like this.
SELECT count(*) into l_var1
from <db table>
where <cond>.
I think the above statement solves your problem.
Regards,
Ganesh N
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Macy,
I would also suggest using SY-DBCNT or DESCRIBE <itab> ... if possible. When using COUNT(*) in a database select it always bypasses the buffer and we should avoid that if possile
Regards,
Ralf
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use DESCRIBE table itab into va_count.
this will give you the number of rows.
Lokesh
Pls. reward appropriate points
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
It is advisable to use sy-dbcnt to count,your COUNT(*) will pass another request from appl.server to database.server..Performance!!
My choice is sy-dbcnt..
Abdul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use select count to count the no of entries.
thanks
vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
11 | |
10 | |
10 | |
10 | |
8 | |
7 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.