Hi all,
I have this sql string
select tt.ENTRYID,
tt.PROJECT,
tt.DEVELOPER,
tt.TASK,
tt.DESCRIPTION,
to_char(tt.WORKDATE, 'MM/DD/YYYY') as WORKDATE,
tt.DURATION,
tt.MILEAGE,
p.PROJECTNAME,
u.USERNAME
from TIMETRACKER tt,
BUGPROJECT p,
BUGUSER u
where tt.WORKDATE between TO_DATE('" + start_proj_date + "', 'mm/dd/yyyy') and TO_DATE('" + end_proj_date + "', 'mm/dd/yyyy')
and tt.PROJECT = p.PROJECT
and tt.DEVELOPER = u.USERID
Now I want to group by tt.DEVELOPER and then group by tt.PROJECT
So when i display them it looks like this
Developer: JJ
Project: Proj 1
Task: task 1
Task: task 2
...
Project: Proj 2
Task: task 1
Task: task 2
...
Developer: James
Project: Proj 1
Task: task 1
Task: task 2
...
Project: Proj 2
Task: task 1
Task: task 2
...
Will this possible to do with only one query? The reason I'm doing this is I'm putting all resultSet into contexts and pass to velocity page.
JJ //
I have this sql string
select tt.ENTRYID,
tt.PROJECT,
tt.DEVELOPER,
tt.TASK,
tt.DESCRIPTION,
to_char(tt.WORKDATE, 'MM/DD/YYYY') as WORKDATE,
tt.DURATION,
tt.MILEAGE,
p.PROJECTNAME,
u.USERNAME
from TIMETRACKER tt,
BUGPROJECT p,
BUGUSER u
where tt.WORKDATE between TO_DATE('" + start_proj_date + "', 'mm/dd/yyyy') and TO_DATE('" + end_proj_date + "', 'mm/dd/yyyy')
and tt.PROJECT = p.PROJECT
and tt.DEVELOPER = u.USERID
Now I want to group by tt.DEVELOPER and then group by tt.PROJECT
So when i display them it looks like this
Developer: JJ
Project: Proj 1
Task: task 1
Task: task 2
...
Project: Proj 2
Task: task 1
Task: task 2
...
Developer: James
Project: Proj 1
Task: task 1
Task: task 2
...
Project: Proj 2
Task: task 1
Task: task 2
...
Will this possible to do with only one query? The reason I'm doing this is I'm putting all resultSet into contexts and pass to velocity page.
JJ //