‎2008 Mar 12 7:21 AM
HI,
Please explain me what exactly the follwing select statement doing.....and also can you please tell me the solution to avoid the select *
SELECT COUNT( * )
FROM nast
INTO l_count
WHERE kappl = nast-kappl
AND objky = nast-objky
AND kschl = nast-kschl
AND spras = nast-spras
AND parnr = nast-parnr
AND parvw = nast-parvw.
Thanks in advance.
‎2008 Mar 14 2:35 PM
Hi Ginger,
From the select statement you get the total number of records that are present in NAST that satisfy the WHERE condition. Instead of COUNT(*), you can use the system variable sy-dbcnt to determine the number of records that will be read using the select statement.
‎2008 Mar 12 7:24 AM
Hi
COUNT(*) supplies the total number of values (rows in a result table or group)
It counts the number of entries in table NAST based on the condition
Regards
Shiva
‎2008 Mar 12 7:28 AM
Hi,
count( * ) returns number of records
in table
COUNT is a set function.
· COUNT(*) supplies the total number of values (rows in a result table or group).
· COUNT(DISTINCT )supplies the number of values that differ from the NULL value (number of values in the argument of the ALL function)
The result has the data type FIXED(10).
Example table: customer
How many customers are there?
SELECT COUNT (*) number FROM customer
Regards
‎2008 Mar 12 7:28 AM
Hi,
it will give u the total number o f records in the table NAST which are satisfying the conditions mentioned in the where clause.
rgds,
bharat.
‎2008 Mar 14 2:35 PM
Hi Ginger,
From the select statement you get the total number of records that are present in NAST that satisfy the WHERE condition. Instead of COUNT(*), you can use the system variable sy-dbcnt to determine the number of records that will be read using the select statement.