Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: sql query, help needed urgently, please
Yep;
select emp_id, week_end_date - 6 "Date", monday hours from table
union
select emp_id, week_end_date - 5 "Date", tuesday hours from table
union
select emp_id, week_end_date - 4 "Date", wednesday hours from table
union
select emp_id, week_end_date - 3 "Date", thurday hours from table
union
select emp_id, week_end_date - 2 "Date", friday hours from table
union
select emp_id, week_end_date - 1 "Date", satday hours from table
union
select emp_id, week_end_date "Date", sunday hours from table
order by 1, 2 ;
A little cludgy, but it'll work.
James
In article <19990421195007.10002.00000153_at_ng113.aol.com>, pgunda_at_aol.com (PGunda) wrote:
>I have a record like this
>Emp_id Week_end_date Monday Tuesday wednesday thurday Friday
>111 25-apr-99 8 8 8
>
>
>The fields Monday, Tuesday etc holds no_of_hours worked
>
>This one record from the table, in a view I have to show like this
>
>Emp_id Date Hours
>111 19-apr-99 8
>111 20-apr-99 0
>111 21-apr-99 8
>111 22-apr-99 8
>111 23-apr-99 0
>
>Is it possible to get it through a sql.
>
>Oracle experts please respond
>
>Thanks in advance
>GR
--
lorenzen_at_yuck.net | Life is complex; it has | real and imaginary partsReceived on Wed Apr 21 1999 - 19:47:11 CDT
![]() |
![]() |