Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Qlikview script forgetting table names

Here's the script in question:

[Cardiology]:
LOAD @1, @1 as Taxonomy, text(purgechar(trim(@2),'.')) as Diag1, text(purgechar(trim(@3),'.')) as Diag2, text(purgechar(trim(@4),'.')) as Diag3, text(purgechar(trim(@5),'.')) as Diag4
FROM C:\Users\kkorynta\Desktop\Cardiology_and_Gastroenterology_Diagnosis_Mix.txt (txt, codepage is 1252, no labels, delimiter is '@', msq);

[TaxonomyReference]:
LOAD TAXONOMY_PK as [Taxonomy], [TAXONOMY FIELD] as [Taxonomy Category]
FROM (ooxml, embedded labels, table is [Master Taxonomy]);

[CardiologyPivot]:
Crosstable ([I-9 CM Variable], [I-9 CM Code], 2)
Load recno() as ID, [Taxonomy],
Diag1,
Diag2,
Diag3,
Diag4
Resident Cardiology;

[CleanCardiologyPivot]:
Load ID, [I-9 CM Variable], [I-9 CM Code], Taxonomy Resident CardiologyPivot Where [I-9 CM Code] > 0;

Left Join (CleanCardiologyPivot)
Load [Taxonomy], [Taxonomy Category] Resident TaxonomyReference
Where exists([Taxonomy]);

This ran correctly for a bit, then on one of my reloads, the CleanCardiologyPivot is no longer recognized as a table. Is this a bug or am I doing something wrong?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

I suspect you need to use NOCONCATENATE between the table name and the load itself.

View solution in original post

3 Replies
johnw
Champion III
Champion III

I suspect you need to use NOCONCATENATE between the table name and the load itself.

Not applicable
Author

Your suspicion is correct. Does the auto-join only happen when the 1st variables of two adjacent loads match? Or can this happen with any matching variables in two adjacent loads?

johnw
Champion III
Champion III

I don't think they even need to be adjacent. I believe if two tables have the same fields, they become the same table with the first name used for it unless you use noconcatenate.

I overuse noconcatenate to be safe. I also always use concatenate explicitly when I want to concatenate two tables, even if they have the same fields and are right next to each other.