Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: sql query, help needed urgently, please

Re: sql query, help needed urgently, please

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Thu, 22 Apr 1999 06:47:23 +0100
Message-ID: <924760171.27375.0.nnrp-04.9e984b29@news.demon.co.uk>

--

Jonathan Lewis
Yet another Oracle-related web site: www.jlcomp.demon.co.uk

James Lorenzen wrote in message <210419991947112381%lorenzen_at_yuck.net>...
>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 parts
Received on Thu Apr 22 1999 - 00:47:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US