How to show all the data in a one row [message #391502] |
Thu, 12 March 2009 07:00  |
sr_orcl
Messages: 82 Registered: January 2009 Location: mumbai
|
Member |

|
|
Hi to all,
This is my query It generates the correct result but not in proper format
I want data shuold be display like this,
EMPLOYEENAME 11G Feature Adhoc Request China
Anil K 0 1 37
Ankur Gupta 0 9 37
Avinash Gore 0 17 37
Jagadeesh 0 37
But my query generates result as attached in a file.Please give me some idea?
SELECT (b.en) employeename,
(Decode(b.tid,'309',b.tot)) test,
(Decode(b.tid,'310',b.tot)) employeee,
(Decode(b.tid,'311',b.tot)) bugfixing
FROM (SELECT a.en en,
a.tid tid,
Sum(a.tot_hrs_spent) tot
FROM (SELECT tm.taskid tid,
tm.taskdesc td,
e.employeename en,
Round(((Substr(et.totime,1,Instr(et.totime,':') - 1) * 60) + Substr(et.totime,Instr(et.totime,':') + 1) - (Substr(et.fromtime,1,Instr(et.fromtime,':') - 1) * 60) + Substr(et.fromtime,Instr(et.fromtime,':') + 1)) / 60) AS tot_hrs_spent,
Row_number()
OVER(PARTITION BY et.taskid ORDER BY tm.taskdesc) TOP
FROM employee_task_dtl et,
task_master tm,
employee e
WHERE et.taskid = tm.taskid
AND et.employeeid = e.employeeid/*AND et.employeeid = 26*/
) a
GROUP BY a.en,
a.tid) b
|
|
|
|
Re: How to show all the data in a one row [message #391525 is a reply to message #391502] |
Thu, 12 March 2009 07:49   |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
sr_orcl wrote on Thu, 12 March 2009 08:00 | It generates the correct result but not in proper format
|
How ironic.
Ok, so you say it doesn't display in the correct format. God help us if we know what format you want. My argument is that is does indeed display in the correct format. Problem solved.
|
|
|
|