03-24-2008 3:43 PM
Hi,
I have table with project end pernr and i wont to count how much
employee i have for projects
e.g.
pernr project
123 e0-111
565 e0-111
158 e0-111
145 e1-222
456 e1-222
665 e1-222
222 e1-222
222 e6-777
i wont to get:
e0-111 3
e1-222 4
e6-777 1
What is the best way to do that ?
Regards
03-24-2008 3:47 PM
Can you do the following:
Select project count(*) as cnt
from zmytable
group by project
03-24-2008 3:47 PM
Can you do the following:
Select project count(*) as cnt
from zmytable
group by project
03-24-2008 3:58 PM
Hi jerry
i do like u tell and i get just the project in itab the pernr Colman is empty what i miss?
regards
03-24-2008 4:04 PM
That's hard to say. Why don't you select project and pernr without the count and group by, and examine the data?
03-24-2008 4:05 PM
Keep you internal table like this way
data : begin of itab occurs 0.
data : project like zmytable-project.
data : cnt type i.
data : end of itab.
Select project count(*) as cnt
from zmytable
into table itab
group by project.
a®
05-25-2010 10:10 AM