Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

join problem : only one reccord with several tables

Hello,

I need your help for a join problem...

I load data from excel sheet (domaines1) and after that data from oracle base (domaines2).

the same ID [N Interaction]could be int he both sources (excel sheet and oracle table), and i want to put the value of the excel sheet if and only if the Id of the excel shheet exists in the oracle table. I don't want to records for the same id.

I made theses scripts and i tried group by, but it doesn't work too....

Anyone has an idea?

domaines1:
LOAD Domaine,
    
[Flux - Objet impacté],
    
Demandeur,
    
[Interaction Generix] as [N Interaction]
FROM
domaine.xlsx
(
ooxml, embedded labels);

domaines2:
Load
    
I_ID as [N Interaction],
    
GEN_CUSTOMER_REFERENCE as [Référence client]
     ;
sql select
     i.incident_id as I_ID,
     substr(i.gen_customer_reference||chr(10),0,5)as GEN_CUSTOMER_REFERENCE
from  
     "SM_27_PRD_L".incidentsm1;

join
load

    
Domaine as [Référence client],
   
[Flux - Objet impacté],
   
Demandeur,
   
[N Interaction]
resident domaines1 ;

drop table domaines1;

2 Replies
Gysbert_Wassenaar

Try using a right join to keep all records from domaines2 and only those from domaines1 that have a matching record in domaines2

domaines1:

LOAD

    Domaine as [Référence client],
   
[Flux - Objet impacté],
   
Demandeur,
    [Interaction Generix] as [N Interaction]
FROM
domaine.xlsx
(
ooxml, embedded labels);

domaines2:
right join Load
    
I_ID as [N Interaction],
    
GEN_CUSTOMER_REFERENCE as [Référence client]
     ;
sql select
     i.incident_id as I_ID,
     substr(i.gen_customer_reference||chr(10),0,5)as GEN_CUSTOMER_REFERENCE
from  
     "SM_27_PRD_L".incidentsm1;


talk is cheap, supply exceeds demand
Not applicable
Author

Sorry gysbert

but i've got only the id from domaines2 and none from domaines1