Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

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 Smiley Wink

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.

1 Solution

Accepted Solutions
deepakk
Valued Contributor III

Two tables together and where

Hi ,

Join the two table using join key word.

eg:

Load

recno() as StartRecono,

id

from table 1

join

load

recono() as endRecno,

id from Table2

Keep the ID field name as same and change rest of the fields from the both the tables to a different names.

I hope this helps

2 Replies
deepakk
Valued Contributor III

Two tables together and where

Hi ,

Join the two table using join key word.

eg:

Load

recno() as StartRecono,

id

from table 1

join

load

recono() as endRecno,

id from Table2

Keep the ID field name as same and change rest of the fields from the both the tables to a different names.

I hope this helps

Not applicable

Two tables together and where

Tnx I think that will work for me Smiley Wink