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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
kinjal1645
Creator
Creator

Field not found error with load statement

Hello,

I am getting error for below script:

--> script

Table1:

SQL SELECT

          FIELD_A,  

          FIELD_B,

          FIELD_C

FROM .. ;

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

LOAD FIELD_A,

Subfield(FIELD_C, '$') as temp3;

LOAD FIELD_A, FIELD_C  

Resident Table1;

-->error

Field not found - <FIELD_C>

LOAD FIELD_A, FIELD_C 

Resident Table1;

Can someone help me with this?

Thank you

Kinjal

3 Replies
sudhirpkuwar
Partner - Creator II
Partner - Creator II

Try this

Table2:

LOAD *,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

//LOAD FIELD_A,

Subfield(FIELD_C, '$', 1) as temp3;

LOAD trace_id,

SubField(metainfo, '$') as Properties;

//LOAD FIELD_A, FIELD_C   

Resident Table1;

Anil_Babu_Samineni

If you look - You are doing Preceding load concept. So, I may look this way where you stuck

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '#', 1) as temp1;

SubField(FIELD_C, '#', 2) as temp2;

LOAD FIELD_A, FIELD_C

Subfield(FIELD_C, '$', 1) as temp3;

LOAD trace_id,

SubField(metainfo, '$') as Properties; // Where is the FIELD_C comes from? If you add like in RED, Your problem solvs

LOAD FIELD_A, FIELD_C  

Resident Table1;

FYI - https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/preceding-load...

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable

ur preceding load throw error.. so ...insted of using preceding load 3 time you can write this way..

Table1:

SQL SELECT

          FIELD_A,   

          FIELD_B,

          FIELD_C

FROM .. ;

Table2:

LOAD FIELD_A,

Subfield(FIELD_C, '-', -1) as temp1,

SubField(FIELD_C, '-', -2) as temp2,

Subfield(FIELD_C, '-', 1) as temp3;

LOAD FIELD_A, FIELD_C   

Resident Table1;