Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
suvechha_b
Creator III
Creator III

How to write script ?

HI All ,

I got a Table object say "temp_Deal" which got "dealgroup_id" , "supplier_id"

I need to create a temp table say "temp_dealgroup"  . Please assist how to write the script -

In the temp table , I need distinct "dealgroup_id" with dealer_id from database table "dealgroup" join with "temp_Deal" with dealgroup_id as common.

Thanks,

10 Replies
ali_hijazi
Partner - Master II
Partner - Master II

temp_Deal:

Load distinct dealgroup_id, supplier_id;

sql select dealgroup_id,supplier_id from temp_Deal;

inner join(temp_deal)

load distinct dealgroup_id;

sql select dealgroup_id from dealgroup;

the output is a table called temp_Deal;

I can walk on water when it freezes
prma7799
Master III
Master III

Like this??


temp_Deal:

Load

"dealgroup_id" as dealgroup_id ,

"supplier_id"

from  "temp_Deal" 

Join (temp_Deal)

temp_dealgroup:

Load

Distinct 

  dealer_id  ,

"dealgroup_id"  as dealgroup_id

from dealgroup

suvechha_b
Creator III
Creator III
Author

"temp_Deal" is already a temp table . How to get it from temp table in qlikview ?

suvechha_b
Creator III
Creator III
Author

Is this the correct script where temp table "temp_Dealgroup" where gets the distinct dealgroup_id with the dealer ?

"temp_Dealgroup":

inner join("temp_Deal")

Load dealgroup_id,

dealer;

SQL select dealgroup.id as dealgroup_id,

       dealgroup.institution_id as dealer

  from VAF5.dealgroup;

prma7799
Master III
Master III

if you don't want distinct id from "dealgroup" table then you can try your query


if possible share some sample data ...

suvechha_b
Creator III
Creator III
Author

what to do if I want distinct dealgroup_id ?

prma7799
Master III
Master III

from which table you want distinct dealgroup_id ??

suvechha_b
Creator III
Creator III
Author

From "temp_Deal" temp table .

prma7799
Master III
Master III

Try this

temp_Deal:

Load Distinct

"dealgroup_id" as dealgroup_id ,

"supplier_id"

from  "temp_Deal"


Inner Join (temp_Deal)

temp_dealgroup:

Load

  dealer_id  ,

"dealgroup_id"  as dealgroup_id

from dealgroup