Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Not applicable

EXISTS problem

Hi All,

I would like to only load records from  Table B only if they exists in Table A. I am pretty sure i want to be using Where Exists but I can not seem to get it correct

Thanks

Dan

TableA:

LOAD `Master Imaging Data ID`,

`Short Date of exam`,

SQL SELECT *

FROM `S:\Imaging - Data Repository\Imaging DR Summary Table.accdb`.`Tbl_ Imaging Data For Analysis`;

//Load Calendar

TableB

LOAD DateActual as [Short Date of exam],

SQL SELECT *

FROM `S:\Imaging - Data Repository\Look up tables\M_Calendar\Calendar LUT.accdb`.`M_Calendar`

WHERE EXISTS(DateActual, `Short Date of exam`);

2 Replies
nagaiank
Valued Contributor III

EXISTS problem

If you have multiple rows in TableA with the same 'Short Date of exam', you may not get the result you want.

If there is only one row for each 'Short Date of exam' in TableA, you may use the script given below to load TableB

TempTable:

SQL SELECT *

FROM `S:\Imaging - Data Repository\Look up tables\M_Calendar\Calendar LUT.accdb`.`M_Calendar`;

TableB:

LOAD 'Short Date of exam' as DateActual Resident TableA;

Left Join (TableB) LOAD * Resident TempTable;


Not applicable

EXISTS problem

table A has multiple values that are the same unfortunatley. thanks for your help tough.