On Nov 3, 11:16 pm, "Binu K S" <[EMAIL PROTECTED]> wrote:
> Hai,
>
> I am working in an HR project . I have one table which store leave
> information . The main fields are
>
> Leave_code , Employee_code , Leave_type , From_date , To_date
>
> Here Leave Code is the primary key of the table .
> Employee    Code is the employee Number .
> Leave Type is the type of leave . Numeric field refering to master table
> which contain different type of leave . Eg 1 - Annual  Leave , 2 - Sick
> Leave
> 3 Emergency leave .
> From Date and To Date are the leave starting date and leave end date .
>
> For Example I have the following data in the leave table
>
> Leave_Code   Employee_Code  Leave_Type   From_Date                 To_Date
> ---------------------------------------------------------------------------­--
> 1                  2050                  2
> 10-Nov-2008           15-Nov-2008
> 2                  2050                  3
> 20-Nov-2008           25-Nov-2008
>
> When I am preparing salary for the Month Of November i need to split the
> date as follows
>
>    01-Nov-2008  to   09 -Nov-2008      Working
>    10-Nov-2008  to   15-Nov-2008       Leave ( Sick Leave )
>    16-Nov-2008  to   19-Nov-2008       Working
>    20-Nov-2008  to   25-Nov-2008       Leave(Emergency Leave)
>    26-Nov-2008  to   30-Nov-2008       Working
>
> While spliting the date we need to consider following cases also .
>
> 1 Leave may start in the previous month and end in the current month . For
> example the leave can start from 28-OCT-2008 and Ends on 5 - Nov -
>
> 2008 . In that case the out put must be
>
>               1-nov-2008  to   5-Nov-2008      Leave
>               6-Nov-2008  to   30-Nov-2008    Office .
>
> Similarly the leave can start in the current month and ends in the next
> month .For example the leave can start from 25-nov-2008 and Ends on 10 -
>
> dec - 2008 . In that case the out put must be
>
>               1-nov-2008    to   24-Nov-2008    Office
>               25-Nov-2008  to   30-Nov-2008    Leave
>
> U can use PL/SQL
>
> Hope I will get Help From u people
>
> Thanks
> Regards
> Binu

This entire report is generated from this one table of data?  What
have you tried to solve this?


David Fitzjarrell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to