Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mattphillip
Creator II
Creator II

Resident table load with concetenation

Dear All,

Hoping for some assistance. The below code is designed to concatenate two files before doing a resident load and storing in a QVD. For some reason I keep getting an error message that the table name 'APPDATAFULLALL' is not found. Could someone please take a look and let me know where I'm going wrong? 

Many thanks,

Matt

APPDATAFULLALL:
LOAD * FROM [lib://<file path>/APP_DATA_FULL.qvd] (QVD);

Concatenate

LOAD * FROM [lib://<file path>/APP_DATA_FULL_OLD.qvd] (QVD);


Table0:

LOAD
Left(ACAD_SESSION,4) & '/' & Right(Left(ACAD_SESSION,4)+1,2) as Session,
Date(Date#(RUN_DATE, 'DD/MM/YYYY'),'DD/MM/YYYY') as Date,
APPLICANT_ID as [Applicant ID],
SCHOOL as School,
NATIONALITY as Nationality,
PROGRAMME as Programme,
PROG_CODE as [Programme code],
LVL as Level,
MODE_STUDY as Mode,
STAGE as Stage,
PREVIOUS_INST as [Previous Institution],
DOMICILE as Domicile,
DATE_OF_BIRTH as [Date Of Birth],
if (Age(Today(),[Date Of Birth])>20,'Mature','Young') as [Young/Mature],
MapSubString('FeesMapping',FEE_STAT) as Fees,
MapSubString('SIMDMapping',SIMD_QUINT) as [SIMD Quintile],
//MATURE,
DISABILITY as Disability,
if(DISABILITY='None','None','Declared') as [Disability Groupings],
ETHNICITY as Ethnicity,
if(ETHNICITY='White','White',if(ETHNICITY='White - Scottish','White',
if(ETHNICITY='','','BME'))) as [Ethnicity Groupings],
GENDER as Gender,
ENTRY_QUALIFICATION as [Entry Qualification],
POSTCODE as Postcode,
SubField(POSTCODE,' ',1) as [Partial Postcode],
CONTEXTUAL as Contextual,
SHEP,
STEM,
ENTRY_SYSTEM as [Application Type],
OFFER_STATUS as [Offer Status]



RESIDENT [APPDATAFULLALL];


DROP TABLE [APPDATAFULLALL];

store Table0 into [lib://<file path>/AppsNew.qvd];

DROP TABLE Table0;

Labels (2)
1 Reply
Or
MVP
MVP

I don't see anything wrong with the code - I ran a stripped down version of the same thing without issues:

APPDATAFULLALL:
LOAD 1 as Field Autogenerate(1);

Concatenate

LOAD 2 as Field Autogenerate(1);

Table0:

LOAD
Field as Field2
RESIDENT [APPDATAFULLALL];


DROP TABLE [APPDATAFULLALL];

 

Do you perhaps have another table already loaded with the exact same fields, earlier in your script? If that is the case, you need to use NOCONCATENATE Load for your APPDATAFULLALL table to avoid automatic concatenation of tables with identical fields.