2 Replies Latest reply on Sep 14, 2012 2:47 PM by David Allan-Oracle

    Transform one row to be two row in OWB 11g

    JoeSSI
      Dear Gurus,

      I have source table A which consist fields:Start_date and End_date.
      I want to transform that source table A into destination table B.
      But, in table B just have one date for one row.

      Source Table A:
      row_id start_date end_date
      1 1-jan-2012 3-jan-2012

      transform to :

      Dest Table B:
      row_id date
      1 1-jan-2012
      2 2-jan-2012
      3 3-jan-2012

      what transformation operators should i use?and how to use it?
      I am new on this

      Thank so much before

      Regards

      JOE
        • 1. Re: Transform one row to be two row in OWB 11g
          Sutirtha Roy
          JoeSSI wrote:

          Source Table A:
          row_id start_date end_date
          1 1-jan-2012 3-jan-2012

          transform to :

          Dest Table B:
          row_id date
          1 1-jan-2012
          2 2-jan-2012
          3 3-jan-2012
          Where from the 2nd row is coming into target table ? What is the logic for it ?
          How is your row_id is increasing in target table ?What is the logic for it ?

          what transformation operators should i use?and how to use it?
          I am new on this

          Thank so much before

          Regards

          JOE
          • 2. Re: Transform one row to be two row in OWB 11g
            David Allan-Oracle
            One technique is to union the source with itself;
            select start_date some_date from src union all select end_date some_date from src;

            You can do whatever transformations you want with the other target columns.
            Cheers
            David
            1 person found this helpful