Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
fdoherrera
Contributor
Contributor

Unir consulta SQL y Excel

Hola, Necesito de su ayuda en generar la unión entre consulta SQL y Excel, con esto generar el campo TIPO y completar con otro campo el valor que la llave no encuentre en el excel, escrito en destacado en amarillo NO.

Espero su ayuda

1.JPG

 

Labels (1)
2 Replies
rubenmarin
MVP
MVP

Hola, puedes cargar los datos del Excel y luego comprobar con Exists, la idea sería algo así:

Datos:
LOAD LOCAL, TIPO From [Excel];

Concatenate (Datos)
LOAD ITEM, LOCAL, If(Exists(LOCAL), 'SI', NO') as TIPO From SQL;

 

O puedes cargar 2 tablas distintas para hacer chequeos cruzados:

chkSQL:
LOAD LOCAL as ckhSQL From [SQL];

chkExcel:
LOAD LOCAL as ckhExcel From [Excel];

Datos:
LOAD LOCAL, If(Exists(LOCAL, chkSQL), 'SI, 'NO') as TIPO From [Excel];

Concatenate (Datos)
LOAD ITEM, LOCAL, If(Exists(LOCAL,chkExcel), 'SI', NO') as TIPO From [SQL];

DROP Table chkSQL;
DROP Table chkExcel;

 

Por cierto, hay un foro dedicado para consultas en español: https://community.qlik.com/t5/Qlik-en-Espa%C3%B1ol/gp-p/spanish-group

fdoherrera
Contributor
Contributor
Author

gracias por tu ayuda, al final me incline por hacer un mapping.