Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the below two tables in Script
Table A:
Header 1 | Header 2 |
---|---|
A | File1 |
B | File2 |
C | File3 |
Table B:
Header 11 |
---|
A |
B |
The values in column Header1 and Header11 are same.
In the script itself, I want a third table as below. This table would contain the values which are not matching between Table A and Table B.
Output:
Header 1 | Header 2 |
---|---|
C | File3 |
TableA:
Load * Inline [
Header 1,Header 2
A,File1
B,File2
C,File3 ];
TableB:
Load * Inline [
Header 11
A
B ];
Final:
NoConcatenate
Load [Header 1] As H1,[Header 2] As H2 Resident TableA Where Not Exists([Header 11],[Header 1]);
TableA:
Load * Inline [
Header 1,Header 2
A,File1
B,File2
C,File3 ];
TableB:
Load * Inline [
Header 11
A
B ];
Final:
NoConcatenate
Load [Header 1] As H1,[Header 2] As H2 Resident TableA Where Not Exists([Header 11],[Header 1]);
Hi Asma,
Please refer the below script
Table1:
Load * Inline [
Header1, Header2
A, File1
B, File2
C, File3
];
Table2:
Load * Inline [
Header11
A,
B
];
Output:
Load Header1 as D1, Header2 as D2 Resident
Table1 Where Not Exists (Header11,Header1);
Best Regards
Shambhu B
Hi Anbu,
Could please explain the use of NoConcatenate in above given script ?
Even if the result is getting without using it.
Hi,
Try like this using Exists() in Load script
TableA:
Load * Inline [
Header 1,Header 2
A,File1
B,File2
C,File3];
TableB:
Load * Inline [
Header 11
A
B];
Final:
NoConcatenate
Load [Header 1] AS Header1,
[Header 2] AS Header2
Resident TableA
Where Not Exists([Header 11],[Header 1]);
Regards,
Jagan.
Hi,
In qlikview if two tables having same columns then this tables will be automatically concatenated, to prevent this we need to use NoConcatenate keyword before load statement.
Hope this helps you.
Regards,
Jagan.
Tables will get concatenated if they have exactly same field names and number of columns. Initially I wrote the script with Final table having same field names as Table1 and result got concatenated.
Since field names are changed in Final table, NoConcatenate is not required in this case.