Skip navigation
Contact Us
1055 Views 7 Replies Latest reply: Jan 14, 2013 11:19 PM by Sravan Vijay RSS
Sravan Vijay Newbie 15 posts since
Nov 4, 2012
Currently Being Moderated

Jan 7, 2013 9:25 PM

To display absence  of students on monthly basis

Hi,

 

I have a senario in which the absence dates have to be splitted based upon the Months and displayed on the monthly basis.

 

 

i have a table which has the absence id, absence start date and absence end date columns.

 

Absence_id      Ab_Start_Dt         Ab_End_Dt

 

100                    10-jan-2012          12-Feb-2012

101                    1-Feb-2012          10-Apr-2012

 

The expected output is

 

Absence_id      Ab_Start_Dt         Ab_End_Dt

 

100                    10-Jan-2012          31-Jan-2012

100                    1-Feb-2012          12-Feb-2012

101                    1-Feb-2012          29-Feb-2012

101                    1-Mar-2012          31-Marr-2012

101                    1-Apr-2012          10-Apr-2012

 

 

can any one help me out in this senario.

 

 

Regards,

Sravan

  • Veeru B Master 1,242 posts since
    Sep 27, 2010
    Currently Being Moderated
    Jan 7, 2013 11:04 PM (in response to Sravan Vijay)
    To display absence of students on monthly basis

    Hi Sravan,

     

    Please try with java transformation.

     

    Regards,

    Veeru

      • Naveen Kumar Dasu Novice 44 posts since
        Feb 20, 2012
        Currently Being Moderated
        Jan 9, 2013 1:32 AM (in response to Sravan Vijay)
        To display absence of students on monthly basis

        Hi Sravan,

         

        I cant get the requirement correctly if you want the absence_id in particular date  duration then you can use an Exp trans with to_date function to achieve in particular duration.Please elobarate the requirement.

         

        Regards,

        Naveen

      • Veeru B Master 1,242 posts since
        Sep 27, 2010
        Currently Being Moderated
        Jan 9, 2013 2:11 AM (in response to Sravan Vijay)
        To display absence of students on monthly basis

        Hi Sravan,

         

        After the source qualifier use expression transformation.

         

        In expression transformation by using last_day function we can achive your desired out put.

         

        Regards,

        Veeru

        • Manojkumar Venkatachalam Novice 82 posts since
          Dec 18, 2012
          Currently Being Moderated
          Jan 9, 2013 4:03 AM (in response to Veeru B)
          To display absence of students on monthly basis

          But if we have more than one month gap between two dates as in case of the Second Absence_ID , then we cant use last_day function alone to solve this. We have to generate the First day and Last Day of the intermediate months in between. Better to use Java Transformation for this Requirement.

More Like This

  • Retrieving data ...

Bookmarked By (0)