2 Replies Latest reply: Jan 25, 2011 10:37 AM by Martijn van Zanten RSS

    Two tables together and where

      Hi there,

      I have the following problem.

      I have two tables:

       

      WH_START:
      LOAD RecNo() as Recno,
      WM.ID as ID,
      WM.DATE as DATE,
      WM.MUTATION as MUTATION,
      RESIDENT WM
      WHERE WM.MUTATION = 'WA'
      OR WM.MUTATION = 'NA'
      OR WM.MUTATION = 'WI';

       

      WH_END:
      LOAD RecNo() as Recno,
      WM.ID as ID,
      WM.DATE as DATE,
      WM.MUTATION as MUTATION,
      RESIDENT WM
      WHERE NOT WM.MUTATION = 'WA'
      AND NOT WM.MUTATION = 'NA'
      AND NOT WM.MUTATION = 'WI';

       

       

      Like you see both tables are from the same "mother" table.

      The together they are the mother table ;)

      Now is the problem that I want to make a new table from all the rows from the first table and add the rows from the second one.
      where (WH_START.Recno + 1) = WH_END.Recno
      and WH_START.ID = WH_END.ID

      Here i have a example

      [View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/1104.MUTATION.xls:550:0]

      I hope somebody can help me.