Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
martinrascioni
Contributor
Contributor

Combinar 2 tablas excluyendo de la segunda registros con campo id igual a la primera

Hola a todos, tengo el siguiente problema a resolver. Tengo 2 tablas:

TABLA A

CampoIDFormapagoImporte
101100
106120
12250
12540

 

TABLA B

CampoIDFormapago Importe
101220
111150
12290

 

Necesitaría crear otra tabla en la que figuren los registros de la tabla A y aquellos registros de la tabla B en el que el campo ID no figure en la tabla A.

Quedando el resultado de la siguiente manera:

CampoIDFormapagoImporte
101100
106120
111150
12250
12540

 

Muchas gracias. Saludos.

Labels (3)
1 Reply
Taoufiq_Zarra

@martinrascioni 

I used an automatic translator 🙂

So May be this solution :

TableA:
LOAD * INLINE [
    CampoID, Formapago, Importe
    10, 1, 100
    10, 6, 120
    12, 2, 50
    12, 5, 40
];

concatenate(TableA)

LOAD * INLINE [
    CampoID, Formapago , Importe
    10, 1, 220
    11, 1, 150
    12, 2, 90
]where not Exists(CampoID);

 

output :

Taoufiq_ZARRA_0-1592678360547.png

 

attached qlikview file

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉