‎2008 Aug 11 7:06 AM
I have a problem setting select structure to calculate the total days from a table .The problem is like that:
I have 2 tables first of which contains 'days' and 'objnr3' fields.objnr3 contains the id's of elements with stufe = 3.
The latter table contains 'objnr2' and 'objnr3' fields but not 'days' and I want to calculate the total days spent on the jobs with stufe = 2 using SELECT SUM(days)....
What should I do to have it calculated?
Edit : The latter table is an internal table, not an SQL one and this makes the problem complicated for a beginner .
Thanks in advance..
‎2008 Aug 11 7:11 AM
HI
First make a loop on inetrnal table and store all entries with stufe = 2 on another internal table.
neaxt make select query of DB table using all entries and then sum up the days.
Aditya
‎2008 Aug 11 7:11 AM
HI
First make a loop on inetrnal table and store all entries with stufe = 2 on another internal table.
neaxt make select query of DB table using all entries and then sum up the days.
Aditya
‎2008 Aug 11 7:41 AM
Hi Andy,
Write query like this
SELECT SUM(days) as days objnr2 objnr3........................
Check this,
Regards,
Santosh Kumar M.