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

What it is the best way to do this (SQL to QV)

I have two tables 1 and 2, and I want the result table that I've attached.

I want to do all of this in the script.

Thank you!

Tags (2)
3 Replies
oknotsen
Not applicable

Re: What it is the best way to do this (SQL to QV)

Looks like a simple join to me.

Just create the load script and add "join" above the 2nd load (or "join(tablename)" to make is more safe). As long as the key columns have the same name (can be 1, can be multiple), Qlik will automatically take care of the rest.

The default join is an outer join. If you want left, right or inner: Just add that in front of the join.

May you live in interesting times!
kush141087
Not applicable

Re: What it is the best way to do this (SQL to QV)

you can perform inner join on ID & let

load ID,

       let,

       gartner

From table1

inner join

load ID,

       let,

       name

From table2

balrajahlawat
Not applicable

Re: What it is the best way to do this (SQL to QV)

I wud say, Join you can do but as Name is the only field required, you can simply use applymap() for same like as you need only one field:

Test:

mapping

load ID,

       let,

       name

From table2

Test2:

load ID,

       applymap('Test(Tablename)','ID(CommonUniqueField)',null()) as name,

       let,

       gartner

From table1

Hope this will help you..