11 Replies Latest reply: Sep 25, 2012 11:44 AM by AK C RSS

    Need Wayout To Join Resident Table To Itself With 2 Field And Using <= In Join

      Dear All,

       

      I am bit new to QV and I am stucked in wrighting data load script to achieve above final result

       

      Resident Table

      CodeDateAmount
      A130/04/20111000
      A131/05/20112000
      A130/06/20113000

       

      Intermediate Result After Join Itself

      CodeDateAmountDate1Amount1
      A130/04/2011100030/04/20111000
      A131/05/2011200030/04/20111000



      31/05/20112000
      A130/06/2011300030/04/20111000



      31/05/20112000



      30/06/20113000

       

      Final Result

      CodeDateAmount
      A130/04/20111000
      A131/05/20113000
      A130/06/20116000

       

      I can solve it by Sql Query like select * from tab1 a inner join tab1 b on a.fld1=b.fld1 and b.fld2<=a.fld1

       

      I know in QV we can join 2 tables on a single common field directly it not possible in QV, so please provide me the wayout for it.

       

      Thanks In Advance

       

      Regards

       

      - IndianQvLover