![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
hi all, i need to produce a report which shows the sum last down level employees and only those |
|
i ve done an attempt which i am posting, but it is giving me weird results(my fault), it is giving me roots also as wel as nodes, |
|
something is missed from my querie but i dont know what should it be, to tell sql to go to the deepest level and get me the guy from there; |
|
select "T_P_C", substr(lpad(' ',length(substr("T_P_C",1,12))-5)||m, 1,15) "Sum_$" from (select sum((assgn_md*job_chg_day)+task_ovhd) m, *task_prj_code as "T_P_C" *from job, assgn, task *where assgn.job_code = job.job_code *and assgn.task_id= task.task_id *group by task_prj_code *order by "T_P_C") * to me it seems something is missing from the where cluse, but i dont know the concept well, would anyone please help |
#3
| ||||
| ||||
|
|
hi all, i need to produce a report which shows the sum last down level employees and only those |
|
i ve done an attempt which i am posting, but it is giving me weird results(my fault), it is giving me roots also as wel as nodes, |
|
something is missed from my querie but i dont know what should it be, to tell sql to go to the deepest level and get me the guy from there; |
|
select "T_P_C", substr(lpad(' ',length(substr("T_P_C",1,12))-5)||m, 1,15) "Sum_$" from (select sum((assgn_md*job_chg_day)+task_ovhd) m, *task_prj_code as "T_P_C" *from job, assgn, task *where assgn.job_code = job.job_code *and assgn.task_id= task.task_id *group by task_prj_code *order by "T_P_C") * to me it seems something is missing from the where cluse, but i dont know the concept well, would anyone please help |
#4
| ||||
| ||||
|
|
hi all, i need to produce a report which shows the sum last down level employees and only those |
|
i ve done an attempt which i am posting, but it is giving me weird results(my fault), it is giving me roots also as wel as nodes, |
|
something is missed from my querie but i dont know what should it be, to tell sql to go to the deepest level and get me the guy from there; |
|
select "T_P_C", substr(lpad(' ',length(substr("T_P_C",1,12))-5)||m, 1,15) "Sum_$" from (select sum((assgn_md*job_chg_day)+task_ovhd) m, *task_prj_code as "T_P_C" *from job, assgn, task *where assgn.job_code = job.job_code *and assgn.task_id= task.task_id *group by task_prj_code *order by "T_P_C") * to me it seems something is missing from the where cluse, but i dont know the concept well, would anyone please help |
#5
| ||||
| ||||
|
|
hi all, i need to produce a report which shows the sum last down level employees and only those |
|
i ve done an attempt which i am posting, but it is giving me weird results(my fault), it is giving me roots also as wel as nodes, |
|
something is missed from my querie but i dont know what should it be, to tell sql to go to the deepest level and get me the guy from there; |
|
select "T_P_C", substr(lpad(' ',length(substr("T_P_C",1,12))-5)||m, 1,15) "Sum_$" from (select sum((assgn_md*job_chg_day)+task_ovhd) m, *task_prj_code as "T_P_C" *from job, assgn, task *where assgn.job_code = job.job_code *and assgn.task_id= task.task_id *group by task_prj_code *order by "T_P_C") * to me it seems something is missing from the where cluse, but i dont know the concept well, would anyone please help |
![]() |
| Thread Tools | |
| Display Modes | |
| |